I like to keep my folders quite organised, and don't like the default Visual Studio folder in my documents. It seems like it should be rather simple to point VS to my own custom folders for most of its settings, which I have done. The only problem is, on start up, VS keeps looking for a settings file (*.vssettings file) in a (non-existent) default folder which I can't seem to find any option to change (c:\users\renzo\documents\visual studio 2013\settings), making the IDE revert to most recent settings (the custom settings file I have created in a nice separate folder... which is fine, but accompanied by an annoying error message). If I so much as touch the tools-options menu (literally, without changing anything) VS then creates a new folder (in that same annoying default location!) storing my current settings! The cycle repeats!
Is there anyway to change where VS looks for these default *.vssettings files, and stop creating this new irritating "CurrentSettings.vssettings" file!?
Might seem a bit nit-picky, but its really getting under my skin!
Thanks,
Renzo
Use mklink to change directory or file location to what you want. Choose one of the commands below.
mklink /d d:\VisualStudio c:\users\renzo\documents\visual studio 2013
mklink /d d:\VisualStudioSettings c:\users\renzo\documents\visual studio 2013\settings
mklink d:\VisualStudioSettings\CurrentSettings.vssettings "d:\VisualStudioSettings c:\users\renzo\documents\visual studio 2013\settings\CurrentSettings.vssettings"
Related
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.
I am working on a parser, using the parser generator ANTLR in Visual Studio. Naturally, ANTLR is continually regenerating certain files. Every single time it does this, VS has a popup saying:
The file has been modified outside of the source editor.
Do you want to reload it?
The answer I want is always Yes to All.
Is there any way to tell Visual Studioto always assume I want to reload auto-generated files, without prompting?
Click Tools then options then under the environment node on the left choose documents then check the box that says Auto-load changes, if saved:
If you are using Visual Studio's internal editor and you know that nobody else is editing the file, you might be wondering why that happens. In my case, I realized I was working on a continuously backed-up network folder, that's why the file got re-saved every time I made a change on it and saved. So, if you can move your file to a local, not-backed-up folder, that might also solve this problem.
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.
I'm porting a Linux C project in Visual Studio 2010.
I have the following folder project structure under linux:
ProjectName->Src->Source C files
ProjectName->Header->Source H files related to C
How should I configure Visual Studio 2010 to recreate the same structure without compile errors ?
How to create the include folder and tell to the the compiler that is an include folder.
I cannot even add include files (existing elements) in a simple folder. They simply don't appear as I add it.
On the C/C++ configuration tab is the Additional Include Directories option. Set it to the following:
$(ProjectDir)/Header
That should do it. Don't forget to do it for all your configs (debug, release, etc).
Oh, and regarding adding new header files, when you open the Add.. option to add a new file, pay close attention to the BOTTOM of the dialog. it will tell you where it will be placed, and you can change it there.
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".