Changing default language in Visual Studio

In Visual Studio 2010 Professional (as well as other versions), when you set the initial profile to Web Development, the default language is set to VB for certain project types, such as Test Project. There is no obvious way to specify the programming language as you create a new project.

You are not able to change the default setting at the usual places such as Tools | Options… or the project’s properties. The most common solution, as suggested in various forums including the quasi-official Visual C# Forums, is to go to Tools | Import and Export Settings… and select Reset All Settings. More elaborate schemes entail manually updating registry keys.

There are many usability issues here. First of all, Import and Export Settings… is hardly the first place one would look for default language settings. Most likely you will have to search the Internet for an answer. Even if you are lucky to guess it right, most people would be taken aback by Resetting All Settings. What settings it will reset remain opaque. Would it wipe out those settings that I do want to keep? The average user doesn’t even remember what settings she’s made over time. She just doesn’t want to lose them. If you are brave enough to click the Next button to see what happens, the next screen does ask if you want to save the current settings. While that’s a relief, I don’t know how I can use them later. Would I be able to somehow merge them with whatever new settings I am about to make? How? At best, it leaves the user uncomfortable with many uncertainties.

The simplest and safest solution, usability aside, is to edit the CurrentSettings.vssettings file directly.
  • Close Visual Studio. Otherwise, your changes won’t persist.
  • Open the CurrentSettings.settings file, by default, at My Documents\Visual Studio 2010\Settings.
  • Update the following tag
<PropertyValue name=”DefaultProjectLanguage”>CSharp</PropertyValue>

The new setting will take effect when you open Visual Studio the next time.

Comments

Popular posts from this blog

Viewing test results and artifacts captured with 'Test & Feedback' in Azure DevOps

The Web Development Puzzle