Change Preferred Language in Visual Studio 2008 - visual-studio

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.

Related

Refactor menu missing from Visual Studio 2015

I am having trouble finding the right-click context menu in Visual Studio 2015. I know that nothing is wrong with my project or the file I am working. I can find the right-click context refactor menu in Visual Studio 2013. However, in Visual Studio 2015 there isn't a refactor context menu in the right-click context menu.
Where did it go? How do I get it back?
Your suggestion cannot include menu Edit → Refactor.
I have tried to reset my Visual Studio settings back to default using menu Tools → Import and Export Settings and that didn't bring the menu back either.
Some of the refactoring tools have been relocated or are at least accessible in a different manner than they were previously.
Using the extract method refactor as an example, you can still use this function; it is just not done the same as before:
Right click
Quick actions
Click extract Method
I think they've changed it to feel more "ReSharper"ey. All of the functionality should still be there however.
Here's more information on refactoring in Visual Studio 2015 - hopefully this helps! Refactoring (C#)
You no longer need to access the refactoring using the mouse right click.
It is recommended that you use the keyboard shortcut keys within Visual Studio.
For all possible shortcut keys, see Default Keyboard Shortcuts in Visual Studio, Refactor.
You might need to build the project to get it to work.
See Code Editing ASP.NET Web Forms in Visual Studio 2013 | Microsoft Docs. (If it is missing then the point is that I am using an example provided by Microsoft.). In Refactoring and Renaming see To extract a method in a C# page. When I follow the instructions I cannot find the feature to extract the code to a method. When I tried the Edit menu it said I did not have valid code. Then I built the project and the feature to extract the code was available and worked.
If you change the name of the object you are refactoring, the light bulb then appears to the left which asks if you wish to change the name of the object (i.e. refactor) or generate a new constructor for the new named object.
Ctrl + . is the shortcut key for extracting a method in Visual Studio 2015 and onward.
Ctrl+M, R does not work anymore in new versions.

VS2012 is missing "format document" feature

I have VS2012 Pro installed, and there is no "Format Document" feature under Edit -> Advanced. I used this all the time in VS2010, and would like to continue using it. Is it just not available in the Pro version of 2012?
It is missing from the menu but you can still access is via shortcut
Ctrl+E,D
If you're talking about other types of files other than .cs, I think VS will generally go by the file extension.
I was trying to edit a .txt file with xml in it and couldn't get the menu option or the shortcut keys to work. Then renamed the file to .xml and all was good.
In VS2012 the command is there as well. It depends on the current settings. I still have it under Edit -> Advanced where it shows the Ctrl + E + D shortcut that is assigned to it.
Please check the following:
Go to Tools -> Options -> Keyboard and check which additional keyboard mapping scheme is applied in the drop down on top. For me it states "Visual C# 2005"
Then, as Jarek already suggested search in the 'Show command containing' for 'Edit.FormatDocument' and see if there is a shortcut assigned now.
Which kind of environment have you choosen when installing VS 2012? Was it for C#? If you want to change that you can do it unter Tools -> Import and Export Settings as described here
Last but not least I'm not sure any more if this function actually is part of Visual Studio 2012 itself (I'm 98% sure it is, but 98 is not 100) so please check if installing the PowerCommands extension solves this issue (Even though the name suggests that they are only for VS 2010 they also support VS 2012). Note that the PowerCommands are also integrated now in the ProductivityPowerTools directly.
It's called "Reformat Selection" in XML Editor toolbar.

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.

How can I point Visual Studio 2008 to a new path for projects?

I didn't see the option to point the workspace (or it's VS equivalent, I'm still learning the terminology for Visual Studio, but it is called a workspace in Eclipse) to My Documents/Programming instead of -- well -- wherever it is now.
What Craig said, plus if you do want to change the default it's in Tools -> Options -> Projects And Solutions.
I've never changed the default and never created a solution/project in the default location, which might tell you something about how relevant it is...
Tools -> Options -> Projects & Solutions.
There is a Visual Studio Projects box.
When you create the project you can specify whatever directory you want, you are not limited to the default.

Resources