We need to localize an app that has hard coded strings across aspx and c# files.
This is a common need, so we expected to find tooling.
We tried resharper, but it turns out that for aspx files, this feature is essentially nonexistent.
What is the path forward? (initially 60 aspx files, ultimately 200+)
I should add that we reviewed all known tools (below). In every case, at least one of the below is true:
Does not work at all in visual studio 2015
crashes right and left
does not support aspx (mostly support .cs files only)
https://visuallocalizer.codeplex.com/
http://www.lingobit.com/extractor/c_sharp_extract_hardcoded_string.html
https://visualstudiogallery.msdn.microsoft.com/39ae29d3-81e1-43d4-9c48-fc9644869d84
Visual Studio - Tool to replace hard coded strings with resources
Find all source hardcoded strings
The best solution we have found so far is: Jinnee.Prelude 2015
https://visualstudiogallery.msdn.microsoft.com/e71acd60-0f16-4adf-b398-18c4fa210916
Gives us localization in C# and static strings in ASPX. But still need to extract inline strings from ASPX by hand.
It crashed VS a couple of times, but VS is fast to restart (thanks to not having resharper installed). Overall it is a win. (Wish we had sources so we could enhance it further!)
Related
I've been running into an issue with Visual Studio 2017 where a T4 template that is generating a bunch of C# classes from metadata is auto formatting the files based on the settings in Visual Studio's C# formatting options. I have changed these options and verified that the changes are reflected in the generated code. Basically what is happening is the T4 code generation completes and then Visual Studio begins to open every single file that was just generated and format it.
I've turned off formatting for the C# language in Tools and Options and disabled .editorconfig files just in case it was picking up one of those, but the template generation seems to ignore this. The problem is that these T4 templates generate ~2000 files which are then formatted which causes TFS to check out the file and eventually crashes visual studio about halfway through the formatting. Is there an option somewhere I'm missing to turn off formatting for generated code? This was not an issue prior to our recent upgrade to VS2017.
The default setting for Visual Studio 2017 is that it doesn't do anything to template files on the onset, so in order for this to happen it should be something you've added to your VS environment. Few things to check...
Any Visual Studio extensions or features. T4 is not well supported so a lot of the extensions and features out there have bugs in them. It maybe that the software provider hasn't thought of your problem yet and you should raise a bug with them. If your using an extension or feature to assist in your software development of T4 then try a different one. Additionally extensions or features not related to T4 also format files. An examples are Productivity Power Tools or Resharper
Under the properties of your template files check the Custom Tool value. It may not seem like the obvious choice, but occasionally if this is not set to TextTemplatingFileGenerator or TextTemplatingFilePreprocessor, you need know why it's not set that way. There might be a perfectly good reason for why its set differently, just so long as you know what that reason is
Normally templates use the *.tt extension, however there are many different acceptable extensions that suit different occasions. Make sure the extension isn't named the same as an existing extension, that formats files in its own way
If the features for C# are off, you might want to consider turning off all formatting features one by one incase the templates files are being considered as part of a different language or under a different option. Start with Tools > Options > Text Editor > Basic > Advanced > Pretty listing as an example. That may give you a clue as to where the setting is being affected.
HTH
I've recently started using Visual Studio quite heavily since starting to develop in .Net
I really like the intellisense as it increases my productivity by allowing me to code faster. Previously when authoring CSS I would just use Notepad ++ and I got very used to some of the little features that this awesome text editor possessed however, now that I am doing the bulk of my work in Visual Studio 2013 I want to try and avoid having too many environments open at once. With this in mind, there is one feature inparticular that I would like to try and replicate in Visual Studio when editing CSS or indeed any other type of code.
In Notepad ++ it automatically includes a sort of guideline which runs down the page between the opening and closing tags of elements as shown below:
My question is, how do I replicate this behaviour in Visual Studio 2013 as the currently setup I have at the moment isn't as clear/productive as you can see below:
Any help would be greatly appreciated.
There are a couple of free extensions you can use to do this. These will run on any of the Visual Studio versions except Express, which does not support extensions.
You can duplicate this with the Indent Guides extension.
You can also use the Structure Visualizer Feature of the Productivity Power Tools.
Note: The backgrounds in the example are different because they are taken on different machines with different themes.
I have a big solution (50+ projects, mixed C++, C++/CLI, C#) plus a number of support files (many are python files) in solution folders. From time to time, for no apparent reasons, Visual Studio removes references to one or more python file from the solution. It's easy to revert via the version control system, but gets annoying over time if you have to do this several times a week.
Anyone knows how to prevent Visual Studio from doing this?
Suppose an international team of developers, using various flavors of Visual Studio 2010 (understand: in different languages), and working on a versioned project.
Every time one of them makes a modification on the Strings.resx, Visual Studio happily generates the file with localized comments. Every time two or more of them do so at the same time, some pretty annoying conflicts appear, which not only are time consuming, but also are completely pointless. Developers get angry and all.
How can this be prevented? Is there a way to tell Visual Studio not to regenerate those comments, or to drop them altogether?
I don't know how to prevent Visual Studio generating localized comments in the .Designer.cs file which backs every .resx file. And I'd certainly like to know.
Until someone finds out, you'll have to setup Visual Studio in English (or whatever language is shared by most of your team) everytime you want to change the resources.
You can do that in Tools > Options > Environment > International Settings (you need to restart VS).
When programming, I don't mind setting up everything in english, rather than in my native tongue, because exceptions and error messages are almost always easier to google when they are in english.
HTH
A program we work with in my office can be automated through VBScript Files, yet the files are saved with an extension *.RVB other then *.VBS. I'd like to use Visual Studio as my editor/debugger, which is working. Yet it is not coloring the code like it does if I have a *.VBS file open.
Under Tools->Options->File Extension I added "RVB" and set it's editor to Microsoft Visual Basic, yet it is still not applying any syntax highlighting to my file. What am I missing?
I realize this might be beyond what you had in mind. However, I see no acknowledgement to your solution so I am going out on a limb here. You could create a language extension and totally control all aspects of the coloring. This is easily transfered to 2010 (the example is in 2008) but remains relevant.
http://msdn.microsoft.com/en-us/vstudio/bb851701
In this video, Hilton Giesenow illustrates a simple working Language Service. He begins by building a simple scanner colorizingsing based on regular expressions, then expands on this to implement the Managed Babel framework, integrating MPLex and MPPG directly into the Visual Studio build as well.