Visual Studio 2010 creates folder in current working directory on launch
Every time I launch Visual Studio 2010, it creates a directory called "Visual Studio 2010" in the current working directory at the time I launched it. It just started doing this at the same time that it forgot all of my toolbar settings and so on.
I've clearly got an incorr开发者_如何学编程ect setting somewhere, but I can't find it.
Under Tools\Options\Projects and Solutions\General I have:
Projects location:
D:\ianUser project templates location:
M:\Visual Studio 2010\Templates\ProjectTemplatesUser item templates location:
M:\Visual Studio 2010\Templates\ItemTemplatesHow do I stop this spurious .\Visual Studio 2010 directory being created and tell it to use the proper one on M:\ instead?
Edit: Since I've started a bounty on this, please be reasonable and don't post a suggestion that doesn't answer the question. For example, don't say 'Have you tried reinstalling?' or 'Have you tried deleting all your settings?' Thank you for your understanding.
Damn, too annoying. You don't know which plugin/addon or something do this...
So we can't find it too* Ok. thanks god, stackoverflow is here... Here is the solution;
Press Win + R
Type "regedit"
Go to this folder by treeview; "[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0]"
Edit everything which are like this; "Documents\Visual Studio 2010\"
Last step; In registry editor, press Ctrl + F
Search the string "Documents\Visual Studio 2010\". And change them too if anything appears...
I suggest an advanced registry editor for this.
Good luck & best regards...
UPDATE:
And if you still have the problem; open VS2010, go to "tools" > click "extension manager" > try to disable all plugins(I mean all of them). And play with VS again, create a new project etc. If there will be created a new folder( named like "Visual Studio 2010" ) in the "documents" then we will sure this comes from the ide:visual studio 2010( not add-ons ). Also, if you are using a "subversion control software" or "sdk service" try to disable them too... ( with disabling services in OS management )
This is the final answer that worked for me.
It turns out that Visual Studio 2010 regularly and automatically exports your settings file. (You would probably expect it to save your settings on exit, but not export them unless you explicitly ask it to.) I think it does this every time you quit, but it seems to create the directory into which it will export as soon as it is launched. This is the problem I was seeing.
This is how I resolved it:
Tools > Options > Environment > Import and Export Settings
The field Automatically save my settings to this file: was just Visual Studio 2010\Current Settings.vssettings
. This is a relative path, so the folder Visual Studio 2010
was being created in the current working directory. I changed it to an absolute path M:\Visual Studio 2010\Current Settings.vssettings
and this solved the problem.
This is another different way, so I'm adding a new answer here. I don't want to edit my previous answer too much( It's started to looks ugly )...
Just go that link, download/copy the script, carefully save and edit for your needs; https://github.com/jerker-back/VSUtilities/blob/master/custom_vspaths.js and run it under admin.user.rights( or disable windows uac )...
Is it possible that you have a macro in your EnvirommentEvents that is causing this? Go to menu Tools -> Macros -> Macros IDE. Look in each of the macros trees in the Project Explorer for EnvironmentEvents to see if any of those macros is the culprit.
None of the solutions here worked for me. I don't think we've seen the golden bullet yet.
I had been writing to the same settings folder for years and all of a sudden that was no good for visual studio anymore. The folder was a networked folder. One day, every time I fired up a solution it would start making me yet another Visual Studio 2010 folder in the same directory as the .sln file.
I tried (and re-tried) specifying where settings are saved. I also went through and did some registry changes. In the end, what seemed to fix it was to re-config the IDE to use a local path, and then re-config it again to use the network path. I did this for all the paths you can set in Tools...Options...Environment...Import and Export Settings as well as Tools...Options...Environment...Projects and Solutions...General. And now I'm back to the setup I've been using for the last few years. It has stopped creating new folders every time I open a solution. For now, anyway.
The brute-force solution:
- Run
regedit
and rename the folder[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio]
to something like "VisualStudio_BAK
". - Run
devenc.exe
/resetsettings
to reset all settings to default.
If you don't know what you are doing, don't try this...! ;-)
精彩评论