Change "Visual Studio 2010" folder location - visual-c#-express-2010

I would like to change the "Visual Studio 2010" folders location to my Dropbox folder, so it gets synced every time I make a change. I have searched on the internet, but haven't found a solution yet.
Is it possible to change the "Visual Studio 2010" folders location from within Visual Studio 2010, specifically Visual C# Express 2010?

If you want to relocate everything in the Visual Studio 2010 folder, it takes a couple steps:
In Visual Studio, go to Tools > Options > Projects and Settings > General. Set the three locations as desired.
In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0. Set the remaining locations that still reference Documents\Visual Studio 2010 as desired.

Tools > Options > Projects and Solutions > General > "Projects location" setting. Change the others too if you routinely create templates.

As stated by the other answers, some of the paths are configurable (settings, default projects location, and the user template locations) and can be set under Tools->Options. However, it is important to note that the actual registry value that determines the root path is at HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation, and that this value is only taken into account if HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set correctly.
To change these registry keys properly:
Make sure Visual Studio is not running.
Open the registry editor and first make sure that HKCU\Software\Microsoft\VisualStudio\12.0\MyDocumentsLocation is set to your actual My Documents location (this is very important, otherwise some of the other paths in the registry will take on default values on the next open/close cycle) and does not have a trailing slash. If this registry value is not there, you must add it.
Change the HKCU\Software\Microsoft\VisualStudio\12.0\VisualStudioLocation to whatever path you'd like the files to be stored at.
(Optional, but recommended) Search for more references to the old path in the registry under both 12.0 and 12.0_Config and update them accordingly.
Note that if you ever change the location of My Documents in Windows, several of the paths (including VisualStudioLocation, which most of the others are based on) will revert to their defaults, and you'll have to follow the steps above again.
(Modify the Visual Studio version number as applicable -- 12.0 is for VS2013, 11.0 for VS2012, etc.)

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsVenusProjectLocationEntries
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\NewProjectDialog\MRUSettingsLocalProjectLocationEntries
if above solution doesnt work try this ones.

From Tools Option> projects and Solution as show down

In case someone come across this question these days, in VS2017 Community there is a "Location" node under Tools-> Options-> Projects and Solutions-> Locations. The fields are no longer under "General".

Related

Only get certain items in TFS Visual Studio

I am using Team Foundation Server, plugged-in to Visual Studio 2012.
We have a wide range of projects and solutions, but rarely need everything on our local machines.
Is there a way using Team Explorer to get latest only on certain solutions in different folders, in bulk, using a single click (or as close as possible)?
Development
Project 1 Get this
Project 2 Ignore this
Project 3 Get this
Framework
Project 1 Ignore this
Project 2 Get this
...in one click.
For this type of thing, I use tf.exe in a command file on my desktop. That way I just have to double-click the .cmd file. It has the added bonus of being a lot quicker than firing up VS.
#ECHO OFF
SET DEVENVPATH2013=C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE
Echo Getting latest files...
REM Navigate to to Solution's mapped folder on local machine, e.g. for me it is D:\Socrates\Development, and issue a get against the relevant TFS folder for the Solution ($/Socrates/DEVELOPMENT)
D:
CD \Socrates\Development
"%DEVENVPATH2013%\tf.exe" get $/Socrates/DEVELOPMENT /recursive
REM Copy the above 3 lines for each separate Solution you want to Get Latest for
Echo Finished.
Echo.
BTW, I'm guessing that you will need to edit the DEVENVPATH to be 11.0 instead of 12.0
So for your example, and assuming your local folder mappings are directly under C drive, you will want something like:
#ECHO OFF
SET DEVENVPATH2012=C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE
Echo Getting latest files...
REM Navigate to to Solution's mapped folder on local machine, e.g. for me it is D:\Socrates\Development, and issue a get against the relevant TFS folder for the Solution ($/Socrates/DEVELOPMENT)
C:
CD \Development\Project1
"%DEVENVPATH2012%\tf.exe" get $/Development/Project1 /recursive
C:
CD \Development\Project3
"%DEVENVPATH2012%\tf.exe" get $/Development/Project3 /recursive
C:
CD \Framework\Project2
"%DEVENVPATH2012%\tf.exe" get $/Framework/Project2 /recursive
Echo Finished.
Echo.
If you setup a workspace that points at the root of the folder structure that you b have listed and in the workspace cloak the folders that you do not want you can simply get latest on the workspace in a single command in the UI and it gets what you want.
https://msdn.microsoft.com/en-us/library/gg490753.aspx
There's two things you can do
Get a portion of the directory structure by opening Source Control Explorer, right clicking a node in the folder tree and selecting "Get Latest Version" from the context menu. This will get the selected folder and all sub-folders.
Open a Visual Studio solution directly from source control. Double click the SLN file in Source Control Explorer. Visual Studio will get all the items referenced by the solution and its projects. You can then get latest on just the solution items by right clicking the top of the solution tree in Solution Explorer and selecting "Get Latest Version (Recursive)" from the context menu.

Find in Entire Solution in Visual Studio 2012 gets quite a lot of result from Temp folder

In Visual Studio 2012, I tried to do some search in:
Find in Files->Entire Solution, then I get quite a lot results from files in
C:\Uses\myusername\AppData\Local\Temp\
. The files take the name like tmpE11.tmp.cs or tmpFBEE.tmp.cpp, the contents are identical to some of the files in my solution.
My guess is that it is caused or auto-generated by some crashes, but why are they reachable by the search? I doubt if I can simply delete them or not.
Maybe this is related to a bug reported, where lots of tmp files created and are then included in the Find Results. If I clear the 'Miscellaneous Files Folder' the search does not include the temporary files.
To display the 'Miscellaneous Files Folder' (see https://msdn.microsoft.com/en-us/library/36bhtx7w.aspx):
List item
On the Tools menu, click Options.
In the Options dialog box, expand the Environment node and select Documents.
Select Show miscellaneous files in Solution Explorer.
Specify the number of documents you want to appear in the folder.
In Visual Studio 2013 you can limit the contents to 0 which effectively prevent inclusion.

TFS 2012 build definition: Parameter Items to Build: cannot convert value Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings

After a lot of editing of my build templates (I recreated them in 2012 to avoid any issues.. but then I suppose I got sloppy and simply copy/pasted whole blocks from the old workflow, and I suppose that must have completely destroyed my versioning) I now have problems with just one build definition based on the build template I edited. (All other ones seem to be working fine.. so I suppose that one got a problem during all the editing. (I was mostly adding and removing Version=11.0.0.0 to the assemblies in the build template))
The exact error is:
Parameter Items to Build: cannot convert value
'Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings' of
type Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings
to type
Microsoft.TeamFoundation.Build.Workflow.Activities.Buildsettings,
reset to default.
It is displayed when editing the build definition and wanting to select the project/solution and configuration to build. Actually, with this now I cannot save (without error) any more and the value gets deleted again.
(I am using VS 2012 (VS 2010 still installed) against TFS 2012.)
How to fix?
Open up your XAML and look at the xmlns's on the Activity root node:
Here's a snipped version of mine:
<Activity mc:Ignorable="sads sap sap2010" <!--Removed-->
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common"
xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client"
xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow"
xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow"
xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow"
xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration"
xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client"
xmlns:mtvc1="clr-namespace:Microsoft.TeamFoundation.VersionControl.Common;assembly=Microsoft.TeamFoundation.VersionControl.Common"
Look for Version Specific references (usually "10.0" or "11.0") and remove them so they look like the ones I have above.
Also, check you project references and ensure that they are not Version Specific.
Here is HOW to change the assemblies in your TFS Template:
In Source Control Explorer, browse to the BuildprocessTemplates and
open (double-click or choose "View" from the Right Click menu) the
template that your build is based on (the one giving you the above
error)
You should see a visual diagram of the workflow. At the bottom are
three tabs: Variables, Arguments, and Imports. Click on Arguments.
Select the BuildSettings Argument
Find the Properties box. The properties for an arguement are:
ArgumentType, Direction,IsRequired, Name, and Value.
Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings
should be the selected Type but the problem is (typical) you can't
tell which version of this assembly is selected. Click the drop
down.
At the bottom of the list choose "Browse for Types..."
NOW you can see all of the available assemblies and their versions. Choose the one you want, most likely upgrade to the latest. Be sure to go through all of the various arguements and make sure their types are all are set to the same version to ensure compatibility.
You may encounter issues now saving the file. All may appear to be ok. TFS indicates it knows the file has changed, checkin seems to go smoothly, but when the file is opened the assemblies still reflect v 10. If you open the same file from the file system you may find that the assemblies in the file really are v 11. What give? No idea. Some sort of glitch in VS.
But here is a work around:
Uninstall VS 2010 Team Foundation Server Power Tools from your
development machine
Open VS 2012 and make sure the template has no pending changes (undo) and get latest version
CHECK OUT FOR EDIT (important) but do not make any changes in VS (it
won't open anyway since the 10 assemblies were uninstalled in a
previous step)
Close VS 2012 (important because if it is open it will appear that your change didn't take)
Open the template from the file system (I used notepad to eliminate any interference from VS) and perform a find/replace on "Version=10.0.0.0" with "Version=11.0.0.0" and save the file
open VS 2012 and now you should be able to see the workflow designer
Of course, check in the file

How to force Visual Studio not to add GlobalSection(Performance) section?

I played with Visual Studio builtin profiling tools and now every time I check out any file this section automatically adds to my solution file:
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
I totally removed all profiling reports, then removed local copy of all source control files from this solution and update to latest. This section still in *.sln file after any checkout.
Other teammates who haven't used prfiler doesn't have this problem.
Has anyone any ideas?
Open the PerformanceExplorer in Visual Studio by using the Menu Analyze -> Windows -> PerformanceExplorer and check if it lists any session entries.
If so delete them by doing a right-click on an entry to open the ContextMenu. Then select "Remove" from the menu.
You should also check the folder of your solution if it contains any .vsp or .psess files and delete them. These are the report files of a profiling session.
Only way I could solve this was to close the solution, delete *.psess and *.vsp files from the root directory, reset my .sln file to the remote version and reopen the solution. Problem was then gone. This was using Visual Studio 2015 Community Edition.

Where can I locate themes for VS2012

Okay, the lack of color on VS2012 is gross.
Is there someplace I can get a theme pack or something for it so that it actually looks reasonable? I really liked the look of VS2010. However, the new one reminds me way too much of 1984.
While we are at it, is there anyway to have it stop shouting at me? ALL CAPS menus are pretty hard to read. [ note: caps was resolved, thanks Konamiman]
Yes, luckily you can revert the Visual Studio 2012 ALL CAPS menus to normal menus by hacking the registry:
Launch regedit and navigate to
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General
Create a DWORD value named SuppressUppercaseConversion with value 1.
NOTE: As explained in the answer pointed by Yahoo Serious, the VisualStudio part on the registry key name should be changed to VSWinExpress for Visual Studio Express, and to VWDExpress for Visual Studio Express for Web.
UPDATE:
I have applied this hack in another machine and at first it did not work. It turned out that I had selected the key name from this response by double clicking it, then copied it, then pasted it in regedit. Well, by doing so I had inadvertently created the key with a trailing space in the name! And hence it did not work.
So, if you apply this hack and it seems to not work, ensure that there are no trailing spaces in the key name.
New Theme editor Specifically for 2012:
http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05
Comes w/ VS 2010 style blue and a few others...
Here is a shot of my VS2012 install that almost looks like the familiar 2010 we are all used to. It makes me feel normal again!
Here is exactly how I did this, step-by-step:
1) Close all instances of Visual Studio
2) Download vsip and extract it to a temp directory. (as of 1/3/2013 the current version is 1.5.2)
3) Open up a command prompt with "Run as administrator"
4) Go to the temp directory and run VSIP.exe - This will run an interactive program that accepts commands.
4a) Type "backup --version=2012" - This will backup all of your VS2012 UI dlls, just in case something gets messed up and you want to uninstall VSIP.
4b) Type "extract" - This will extract all of the old icons from your installation of VS2010 (per VS2010 license VSIP can not distribute those icons so we have to have a local install to pull them from).
4c) Type "inject" - This will inject all of the old 2010 icons from the previous step into the VS2012 DLLs.
4d) Type "menus -n" - This will change the menus so they are NOT ALL CAPITALIZED!
5) Download and install NiceVS - do not download the one dated 10/14 or you will be missing icons. As of 1/3/2013 I downloaded the file named "NiceVS.0.8.1.1 Beta.Full.vsix".
6) Download and install VS2012 Color Theme Editor - The next time you start VS2012 select the "Blue" theme from the color select window.
Now you should have a nice install of VS2012 that looks like my screen shot above! It takes three different applications to patch that hideous UI but it's certainly workable now! If you don't have VS2010 installed on the same machine as VS2012 then you will have to run 4b on a machine with VS2010 and then copy the VSIP Images directory to your 2012 development machine.
Update: If you install "VS 2012 Update 1" after running these steps you will need to re-run step 4c from the VSIP admin prompt (or all of step 4 if you didn't keep the extract of the VS2010 images). The file menu icons and color scheme stay as they are but the update reverts the icons in the solution explorer back to the ugly ones. Re-running the VSIP inject fixes it right up!
I feel your pain, and have been checking daily for a solution. I've now discovered this site, which includes a theme editor, as well as drumroll a VS2010 theme for VS2012!
http://bchavez.bitarmory.com/archive/2012/08/27/modify-visual-studio-2012-dark-and-light-themes.aspx
Edit - I just noticed that Brian Chavez already posted the same link as me. However, I don't think it included a premade 2010 theme until today.
Edit 2 - Another theme editor - http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05
AND ICONS!!! - http://vsip.codeplex.com/
http://studiostyl.es/
The themes for 2010 work for 2012 as well
This extension was just released a couple of days ago:
Visual Studio 2012 Color Theme Editor
If you want to change the VS shell environment themes in Visual Studio 2012, try this utility:
Modify Visual Studio 2012 Dark (and Light) Themes
Source Code
The quick option to look is VSColorOutput extension for VS2012. Just look at Tools->Extensions and NUGet package will help you to locate it asap.
Another option would be downloading and Visual Studio Color Schemes. http://studiostyles.info/ . Here is a link to Scott Gu's blog which describes how to apply your preferred schema.

Resources