Visual Studio 2010 loses user settings when run side by side - visual-studio-2010

Since some time I register an annoying behavior in Visual Studio 2010 SP1 under Windows Vista. Sometimes my user settings are lost on start up. This happens most of the time, when I had open the same solution parallel in two instances of VS and after closing both, the settings are lost on the next start of VS.
I do not change settings while running the two VS.
Did anyone experience the same behavior?
Of cource I saved my settings, but especially my keyboard short cuts cannot be fully restored, because I overwrote some global default short cuts. So that's what bugs me about it most. ([EDIT] This is an independent problem, see Microsoft Connect.)
Is there a way to get VS not to kill my settings on start?

VS overwrites user settings on close. If you want to avoid such problems, you should close an instance where you made changes last.

Related

Visual Studio 2017: Solution Explorer and other ancillary tabs/windows always closing and having to be re-opened

Every time I close a solution, or start debugging, or stop debugging, everything except the main code tab auto-hides.
This includes anything docked to the right - like the Solution Explorer, Properties, etc. (for me at least). It also includes everything docked to the bottom - like the Find Results, Output, Immediate Window, Error List, etc. (again, for me at least).
I cannot find a setting that keeps these docked items open. I find it very annoying that I have to keep re-opening them and would like to find a more permanent solution.
I recently updated from VS 2013. It did not do this.
Is there a setting? Is it something else? I am running on Windows Server 2012 R2. I open Visual Studios as the Administrator.
To Optimize Visual Studio Startup Time, VS2017 has introduced new feature Manage Visual Studio Performance under help menu. Using this option, one can override startup behavior of tool window like error list, package manager console etc.
For more information, refer Optimize Visual Studio Startup Time.

Visual Studio 2010 (devenv) Hung Process After Closing

I have problem with Visual Studio 2010 on Windows 7 64-bit. After some time of work VS starts consuming ~50% CPU and UI responding slows down. When I close VS then UI disappear but process stay.
When I forgot to kill those hung processes at the end of day, I will end up with numerous devenv.exe processes.
I have reinstall Visual Studio and reinstall Windows and ended up with the same problem... doesn't change anything. Please help. :/
Remove and/or uninstall all third-party Visual Studio add-ins and extensions. Disabling is not good enough.
Visual Studio 2010 relies heavily on graphics. Therefore:
Update your video driver.
Turn off "Enable rich client visual
experience"
Turn off "Use Hardware graphics acceleration if
available"
There are also temporary files that Visual Studio uses that may need to be cleared out.
Clear out your %temp% folder.
Clear out %AppData%\Local\Microsoft\WebsiteCache
Clear out %AppData%\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies
Your project and solution user settings may be corrupt due to so many "crashes".
Delete .user and .suo files (you will lose the startup project, bookmarks, breakpoints, and other user settings specific to projects and solutions.)
Begin where you began before - it may seem overkill but this is the only way to be sure we are addressing everything short of hardware issues.
Reinstall Windows - make sure you are using a validly licensed copy, and patch the hell out of it before installing Visual Studio.
Note: I doubt it is a GPU driver issue, but it never hurts to use the most up to date driver and this is the place to do it right after a fresh OS install.
Install Visual Studio .Net 2010 but do not start it up. Let it get the frameworks installed fresh.
Use Windows Update to install the VS 2010 SP1 patch, and any/all patches for .Net frameworks.
Make an images for yourself right here so you have something to build from if you need to try this again. It will save you lots of time.
Fire up Visual Studio, and test your closing before installing anything else.
If it does not work here, there's likely some conflict between PC hardware and window OS, and you should try to find this symptom in other applications to get more info.
Here's what i would be looking for:
Does it happen EVERY TIME?
Does it happen after you debug your project ? does it happen for ALL projects?
Does it also happen when you don't load any projects? (simply start the IDE and wait).
Does it happen after a debug session of your application? maybe the application is not closed properly?
Do you have any other apps running at the same time that may cause this? try reproducing with a minimal set of apps/services running.
What are you doing exactly when it starts freezing ? anything in particular?
I would try to get 2-3 memory dumps at the time of hanging, post it here as well as to MSFT people. That would be a good start.

Compile on-the-fly in Visual Studio 2008 very slow

I'm experiencing some performance problems. When I edit a file, Visual Studio 2008 performs a background (on-the-fly) compilation and then, it updates the error list. During this time, the cursor in the file editor disappears, and the keys I press to move or type more character are buffered.
Once the background compilation is finished, the changes are reflected in the editor (1 - 2 seconds). Every time I edit a file, which happens often, this happens.
How can I fix this problem? If this is not possible, can I disable this automatic build?
I had an odd performance-related issue today. My Microsoft Visual Studio seemed to be taking far too long to perform even the simplest of operations. I Googled around and tried a few ideas that people had such as disabling add-ins or clearing Visual Studio’s recent projects list but those suggestions didn’t seem to solve the problem. I remembered that the Windows SysInternals website had a tool called Process Monitor that would sniff registry and file accesses by any running program.
It seemed to me that Visual Studio was up to something and Process Monitor should help me figure out what it was. I downloaded the most recent version, and after fiddling around a bit with its display filters, ran it and to my horror, I saw that Visual Studio was so slow because it was accessing the more than 10,000 folders in C:\Users\krintoul\AppData\Local\Microsoft\WebSiteCache on most IDE operations. I’m not sure why there were that many folders and moreover, wasn’t sure what Visual Studio was doing with them, but after I zipped those folders up and moved them somewhere else, Visual Studio’s performance improved tremendously.
The Windows SysInternals website has a number of other useful utilities for network management, security, system information and more. Check it out. I’m sure you’ll find something of value.

Why is Visual Studio 2010 changing my Design window positions after returning to Design mode from Build mode?

I have been having an issue with Visual Studio 2010 that is driving me completely bonkers. The general problem is that Visual Studio 2010 does not seem to be remembering my window positions. (Visual Studio 2010, v.10.0.40219.1 SP1Rel on Windows XP SP3.)
Now, I am aware that Visual Studio 2010 has different window layouts for Build and Design mode. I have come to accept this as there are some things in life I cannot change. If I could turn off this feature, I would be over-joyed, but I do not think it is possible.
My biggest issue at this point is that Visual Studio 2010 doesn't remember the window positions in Design mode after going into Build mode and returning to Design mode.
Here are some screenshots to illustrate this issue:
Imagine me coding. OK, time to build.
OK, the window layouts changed. This is annoying, but whatever. Let's go back to design mode.
This looks OK, but WAIT -- why don't the windows return to their previous position?
I'm using a small Visual Studio window size here, but as the red box shows -- there is a difference. Why does this happen and what can I do to fix this issue? It is driving the OCD in me completely nuts. It doesn't look like a big change in these screen shots, but when I have my VS instance maximized across my two monitors (configured to display as one continuous desktop, instead of two desktops) -- it's a very noticeable and annoying change.
Possible problems that I thought were causing this issue:
I store my working copy in a Dropbox folder. I work from that dropbox folder. However, I've tried this same issue with Dropbox turned off and reproduced the above issue.
Corrupted settings file. I tried this with a new MVC application, saved it outside of the Dropbox, and the same thing happened.
Windows XP issue. I know I need to upgrade, but unfortunately that is not always an option. If Windows 7 doesn't have this issue, I will gladly upgrade.
#Shtong has answered below that I should use a dual monitor setup with different desktop configurations and install Visual Studio Productivity Power Tools. While this will technically fix the problem (I can now have two sets of mixed tabs and the sizes do not change) - the docking positions are forgotten instead. This means that if I dock the Solution Explorer to the right in design mode, then build, then go back to design mode -- my docked window is no longer docked.
I've also had this same problem in Visual Studio 2008.
Did you try installing the Visual Studio Productivity Power Tools that lets you split your editors into different windows, making two windows and attaching each to one monitor (instead of having one stretched over the two monitors) ? That way each window should fit into its monitor like every other window and your problem should disappear.

Visual studio forgets window settings and makes a mess

I have this problem where I open Visual Studio and the internal windows are scattered all over the place. None of them are docked; some that should be visible have become invisible and vice versa. I then have to spend ages getting the windows back where I like them.
It only seems to happen with some solutions and only appeared recently.
For the life of me I can't fix the problem. Has anyone else been through this?
Sounds like there is definitely a problem with Visual Studio retaining your settings between round-trips and possibly your Visual Studio settings profile in general.
The solution I'd recommend is firstly to reset all settings, secondly customize things to your personal preference and finally take a backup of those customized settings. The idea is that this settings backup file can be used later to automate a quick settings restore to a point you are happy with. The following steps show how to do this and hopefully should sort out even the most confused Visual Studio setting issues:
Close down all instances of Visual Studio.
Go to Start > Programs > Visual Studio 200X > Visual Studio Tools > and choose 'Visual Studio 200X Command Prompt'
Run the sligthly less well known 'devenv.exe /ResetUserData' command. With this command you will lose all of your Visual Studio environment settings and customizations. Because of this, the /ResetUserData switch is not officially supported and Microsoft does not advertise it (the switch is not described in the help for devenv.exe you get when you type devenv.exe /? in a command prompt). Importantly, wait for the resulting devenv.exe process to disappear from Task Manager or even better Process Explorer.
When the process disappears from Task Manager or Process Explorer, run 'devenv.exe /ResetSettings' which will restore the IDE's default settings and eventually start a single instance of Visual Studio.
Now in Visual Studio choose 'Import and Export Settings...' near the bottom of the 'Tools' menu to start the Import and Export Settings Wizard.
Choose 'Reset all settings' radio button and Next > Choose 'No, just reset settings, overwriting my current settings' and Next > Choose your personal 'Settings Collection' preference, I would choose Visual C# Development Settings here (Note: What you choose here has an effect on keyboard shortcuts etc. but you can always repeat this process until happy) and click Finish.
When you get the message that 'Your settings were successfully reset to XXXXXX Development Settings.' click Close then spend a good bit of time adding any personal customizations to Visual Studio such as opening windows you always want open, customizing toolbars and adding any toolbar buttons etc.
When you are finished with your personal customization and completely happy with your setup go again to Tools > 'Import and Export Settings...'
Choose 'Export selected environment settings' radio button and Next > Tick 'All Settings' and Next > Choose a file name and directory and click Finish to store a backup of your current settings in a .vssettings file.
In future if things go haywire again head back to Tools > 'Import and Export Settings...' and this time choose 'Import selected environment settings' radio button and Next > Choose 'No, just import new settings, overwriting my current settings' and Next > Either choose the name of your .vssettings file from the list (usually under the My Settings folder) or Browse.. to where you saved the file and Next > Tick 'All Settings' and click Finish.
Importantly, close the single instance of Visual Studio. Any future instance you open should retain your latest customizations.
Visual Studio corrupts its settings with regular monotony (always has done, I've been suffering from this since the Visual C++ days, and it's still a bugbear in VS2013).
Often this seems to be totally at random, but it's highly probable after a crash.
It will also lose any changes to your settings if Visual Studio doesn't shut down cleanly - for some reason instead of saving back the settings when you OK the dialog, VS seems to wait until it quits to write back your changes, so after changing options I always quit and restart to ensure the changes have been flushed to disk. Similarly you should never change options with 2 or more instances of VS running, as the last one to quit will overwrite the settings.
In particular, there is an easily reproducible case: If you launch two or more copies at the same time (by which I mean if you start up two or more copies, so they are all initialising at the same time), they seem to fight over the settings file and it becomes corrupted or resets to defaults.
The best two workarounds I've found are:
Never launch more than one instance at a time. If you need to run several instances concurrently, then wait for the first one to finish loading its Solution before you start to launch the next.
Always use Tools > Import and Export Settings to save your settings to a backup file, so that recovering from this corruption only takes a few seconds each time it happens.
Another smaller, but still rather irritating habit is that if VS is minimised when it is quit (e.g. by shutting down), it corrupts its window position information and the next time you run it, it will be maximised.
I had a similar issue when the My Documents folder was stored on a mapped drive. If I opened VS before mapping the drive, VS would act as if it was the first time it had been opened. I solved this issue by storing the environment settings on the local disk.
I just ran into this problem too (seemed to trigger after a windows update) where I kept getting some bogus window layout no matter what I did. The above suggestions didn't work either. But luckily the suggestions in: Why doesn't VS 2008 IDE remember my preferences? of deleting:
%APPDATA%\Application Data\Microsoft\VisualStudio\9.0\windows.prf
worked.
TP
Actually I worked out what the culprit was: previous VS crashes.
If one of my Visual Studio instances crashes for whatever reason - the next time I start up VS, I get a weird batch of settings. The behaviour depends on various factors, like whether or not I had other instances of VS open at the time.
I tried Peter McG's solution, still didn't help.
What ended up working for me was to delete my VS Solution User Options (.sou). Located in the same directory as my solution.
Only bad thing is you have to redo all of your settings. This included my exception changes. Not to much to change, but if you have a lot of customization it could be a real pain.
There must be something in that file messing everything up, but deleting the whole file is quick and easy.
Which solution you're opening shouldn't matter because those settings are not solution-specific. But I wonder do you maybe have Visual Studio 2005 and 2008 installed? If so, opening a solution created in 2005 will open VS 2005 and opening a 2008 solution will open VS 2008. You may have VS 2005 even if you didn't install it. For example, InfoPath 2007 installs a VS 2005 shell.
First I would position the windows where you want them, then do a Tools -> Export Settings and include only the window layouts. That way you at least have something you can revert to.
Then I would check Tools -> Options -> Import Export Settings and make note of where the "Automatically Save My Settings To This File" path is set to. Keep an eye on that file. Do you have any sync software that may be inadvertently overwriting it? Does it point to a non-existing location?
My issue is similar, but the result is the app crashes. The problem was this value
In HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\MainWindow. It was set to "0 1000 -280 -100 3" probably due to having multiple screens and moving the UI around a lot.
Deleting this value allowed the app to restart successfully. It gets recreated on startup.
I'm facing similar issue. And it also only started recently, like, within the last 30 days or so. The only thing I remember changing in this period was updating Resharper 4.5.
I have experienced something similar. In my case the text editor colors (c# editor for example) are going haywire. The only solution that I tried and works for me is change color theme so something else and then back to what I want.
In my case its not the Window layout being corrupted but Intellisense offering code completion and pop-up help. Never had this issue for the last decade, now it happens 3 times a day at least. Win8.1, Visual Studio 2013, ReSharper 8 and now ReSharper 9 (in hopes the upgrade would fix it).
I now routinely have to
close the solution,
Tools/Import-Export Settings/Reset all settings
Close Visual Studio
Open Visual Studio Import my saved settings
RE-open the solution and continue working
I can then work fine again for quite some time until something goes awry... lets say a stack-overflow while I'm debugging. At that point I just know my settings are screwed and my Intellisense is dead again.
I'm starting to wonder if it isn't something to do with a latest Visual Studio update. There are things in there I never use like the advertising crap and Office development integration. MS Office has its own issues, like Office 64 bit not being seen by any other application such as Quicken as an installed email program. Or maybe its a conflict with ReSharper which wants to overtake and 'extend' the Intellisense feature.
Either way, I'm sure its a different manifestation of the same issue: Visual Studio settings are going sideways during normal use.
I just came across this issue in VS 2012, reset window layout was doing nothing.
I extrapolated
%APPDATA%\Application Data\Microsoft\VisualStudio\9.0\windows.prf
to
%appdata%\Microsoft\VisualStudio\11.0\Windows.index
... deleted it and was back in business!
Make sure you close all instances of VS first!

Resources