How do I change my development environment to a different language in Visual Studio? - visual-studio

When I first installed Visual Studio, I chose to customize my environment for "Visual C++" development. Now, I am working primarily in C# and want to change this setting to a C# environment.
How can I change the environment settings from one language to another in Visual Studio?

Tools → Import and Export Settings → Import Selected Environment Settings...
A dialog will appear, prompting you whether or not you want to save your current settings. If you've made extensive customizations and might want to go back to them at a later date, you should choose to save them.
Then click "Next". You'll be prompted to import a set of environment settings. At the top will be the default environment settings options, customized for each language. In your case, you'd choose C#.
If you wanted to re-import your saved settings, you'd do it the same way—just browse to the saved settings file in the final step of the wizard.

You could also reset all of the settings from the command line:
devenv /resetsettings
And then choose all over again when prompted.
Note: I prefer "General Developer Settings" if you are going to do development in different technology areas (C++, C#, VB, etc.).

Related

Visual Studio Default Interface?

I want to switch Visual Studio 2012 interface from .NET to C++ - I have selected .NET during first run, and now I dont know how to change it to C++.
At the moment it shows only .NET projects when I make "New Projects", and there seems to be no way to create anything else than that, however I have installed full version with other gadgets.
Try following steps like this:-
1) Tools -> Import and Export Settings...
2) Select "Reset all settings" and click Next
3) Choose "Yes" if you want to keep your existing settings
4) Click Next
5) Select the profile of your choice and click Finish.
I didn't think that the environment settings actually hid any particular project types, but the way to re-access the "which settings do you want to use?" dialog is under Tools -> Import and Export Settings.
One of the options is Reset all Settings, which then lets you select which defaults you wish to use.

Can I uninstall Visual Basic from Visual Studio 11 beta?

Is it possible to not install all components of Visual Studio 11 Ultimate? Specifically, having Visual Basic installed makes project selection clumsy. While I am at it, I would also uninstall F# and C++, leaving a simpler environment for C# web development. Does the beta not have this granularity yet?
There's no way in the beta to remove languages.
Also if you set your settings in Visual Studio to General Development Settings and VB is listed first in the New Project dialog. Because the beta has a problem where it doesn't remember your last project type you keep getting VB projects selected when doing C# work.
I'm not sure if this is your problem but if it is you can fix this
Go to Tools | Import and Export Settings
Select Import selected environment settings and click Next
Decide if you want to save your settings and click Next
Choose Visual C# Development Settings and click Next
Deselect everything except for the General Settings > New Project Dialog Preferred Language entry and click Finish.
When you add a new project you will have C# as your default.
Hopefully that helps

Can I have VS2010 change the environment settings based on the project loaded?

see title
For example: Open a C++ project, it opens using the C++ environment settings or an arbitrary environment settings file. Then open a C# project and then it opens using the C# environment settings or an arbitrary environment settings file.
Or should I honestly not care and just use the interface I already set up? What advantages would there really be for switching them per project/project type?
Maybe Perspectives extension can help you. After installing you can save your current layout as perspective (just like in Eclipse) in Visual Studio 2010.

Change Preferred Language in Visual Studio 2008

When you first install Visual Studio it asks you what your preferred language is and I chose VB. I am now becoming more of a C# guy, but everytime I want to go create a new project. I have to click Other Languages>Visual C#. Is there any way to not have to go through that process. I have seen other people in videos have it like this and I cant seem to find a setting for it. Thanks
Tools -> Import and Export Settings... -> Reset all Settings. Then select C# when asked.
Note that this will likely remove some of your other IDE settings.

How to use different tab settings in different projects in Visual Studio

The Visual Studio options dialog allows you to set tab preferences (size, insert-spaces, etc.) on a per-language basis. But I am regularly working on a couple of c# projects with different settings for these values.
Is there a way to override the global settings on a per-project basis, or at least toggle between them easily?
Another approach may be through the extensibility API: it should be possible to write a macro or add-in that changes these settings.
E.g. to change the tab size to 6, use the following:
DTE.Properties("TextEditor", "CSharp").Item("TabSize").Value = 6
Here's a link that explains how to find out the names of the properties: http://support.microsoft.com/kb/555445
You can open visual studio with a special "reset" settings file which overrides the default settings. Using this method it is possible to create two shortcuts, one with each tab setting. Details are here.
I'm afraid you can't do that on a per-project basis.
But, with Tools/Import and Export Settings... you can export each settings in a file and you could import the one that fits your current project.
Visual studio 2017 adds .editorconfig support, which is very handy for such settings.

Resources