Visual Studio 2010 - Option Window and Save Settings Hang/Freeze

image_thumb4[4]Recently, Visual Studio 2010 was taking ridiculously long time saving settings from the following locations:

  • Tools > Options… window.
  • Tools > Import and Export settings … window

Saving settings from these location took about 15 minutes to save! It was seriously frustrating.

I noticed, CurrentSettings.vssettings file was approaching 13MB.

After opening the CurrentSettings.vssettings file I found multiple <ViewBookmark> tags filling up the settings file. They looked something like:

<ViewBookmark Name="D:0:0:{GUID}|… path to file .css …||{GUID}" ViewBookmarkType="DocumentWell" DockedHeight="1399" DockedWidth="1342.97336877197"/>

So, I manually deleted the duplicate lines in the CurrentSettings.vssettings file. The CurrentSettings.vssettings file was reduced to 335KB. Awesome. I opened and closed Visual Studio to see if the settings file still worked and to my surprise, the bloated lines I removed were automatically inserted back into CurrentSettings.vssettings! Wow. Seriously?

After some time tracking down where these lines were coming from, it turns out if you look in the following folder:

C:\Users\USER\AppData\Roaming\Microsoft\VisualStudio\10.0

You’ll find two files “Debug.*.winprf” and “Design.*.winprf” and associated *.winprf_backup files. These files appear to be WPF XAML files that store Visual Studio’s window (and toolwindow) information. If you delete them, Visual Studio will re-create the XAML files using default tool window locations. However, if you want to keep your window settings, you’ll need to manually edit the files and remove the bloated lines that are filling up the XMAL file.

Once you remove the bloated XMAL lines from your *.winprf and CurrentSettings.vssettings file, saving your Visual Studio settings should be quick once again!

Hope that helps,
Brian Chavez

Comments

# re: Visual Studio 2010 - Option Window and Save Settings Hang/Freeze
Gravatar Thank you very much my friend!!
You saved my life!!
I tried every things, but you gave the only one solution.
Thank you again ;)
Left by Bloodagain on 8/1/2012 11:48 PM
# re: Visual Studio 2010 - Option Window and Save Settings Hang/Freeze
Gravatar Thank you very much my friend!!
You saved my life!!
I tried every things, but you gave the only one solution.
Thank you again ;) !!!
Left by Bloodagain on 8/1/2012 11:50 PM
# re: Visual Studio 2010 - Option Window and Save Settings Hang/Freeze
Gravatar ... It happens again !!
Left by Bloodagain on 8/3/2012 4:44 AM
# re: Visual Studio 2010 - Option Window and Save Settings Hang/Freeze
Gravatar Brian, thanks so much for this gem, microsoft should be ashamed of themselves releasing such a bug. Why isn't there any coverage of this on the official MS site? Do they think because they patch something that everyone will be running the latest patch. Even identifying the problem was nigh impossible.

You are a genius
Left by Mike on 8/5/2013 10:35 PM
# re: Visual Studio 2010 - Option Window and Save Settings Hang/Freeze
Gravatar I had the same problem with Visual Studio 2013, and I effectively accomplished what you did above by doing this:
- Export my current settings, making sure to UNMARK General Settings > Window Layouts.
- Re-import the settings I just exported, but making sure I left General Settings > Window Layouts MARKED now (so it would overwrite the current Window Layouts with the "clean slate" of the imported settings.
Left by Greg Bakker on 5/11/2015 4:18 PM

Leave Your Comment

Title*
Name*
Email (never displayed)
 (will show your gravatar)
Url
Comment*

Please add 1 and 8 and type the answer here:

Preview Your Comment.