CraigWardman.com

[ Silverlight Designer Crashing Visual Studio 2010 ]

/Blog/Post

Silverlight Designer Crashing Visual Studio 2010

After the Silverlight runtime update to 4.0.60531.0, opening a XAML file in design view was crashing visual studio.

There was also a problem in opening the Toolbox, or any designer that loads the toolbox, with Visual Studio crashing when “Loading toolbox content from package ‘Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage’ {2C298B35-07DA-45F1-96A3-BE55D91C8D7A}”

When I found the solution, it appears this probably only affects systems where ‘System.Windows.dll’ has been previously registered in the GAC.

The solution, is to remove System.Windows from your GAC using the following command from the Visual Studio Command Prompt:
gacutil -u System.Windows

Share This!

5 Comments to Silverlight Designer Crashing Visual Studio 2010

  1. Muhammad Abrar Ullah's Gravatar Muhammad Abrar Ullah
    October 21, 2011 at 7:40 pm | Permalink

    It worked. but a compiler error pops stating “Could not load file or assembly ‘System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e’ or one of its dependencies.”

  2. Dave's Gravatar Dave
    October 18, 2011 at 7:24 am | Permalink

    Well done +1

  3. September 22, 2011 at 5:37 pm | Permalink

    Thanks Craig & Peter!
    Dragging version 4.0.60531.0 from the Silverlight installation folder into my GAC has fixed my VS Toolbox.

    I wish I’d found this solution yesterday before I whacked all my IDE settings etc.. Oh well, I’m happy not to reinstall my OS as so many others had suggested!

  4. Peter's Gravatar Peter
    August 25, 2011 at 3:01 pm | Permalink

    Update:

    It would seem version 4.0.60531.0 of system.windows.dll doesn’t crash. Somehow I had version 4.0.50826.0 in the GAC.

  5. Peter's Gravatar Peter
    August 25, 2011 at 2:47 pm | Permalink

    While your fix does stop the designer from crashing, I now get an unable to load system.windows in one of my xaml files. I registered the v3 system.windows but unfortunately I’ve used features of v4 (texttrimming)…guess I’ll put up with crash (avoid opening xaml).

Leave a Reply

*
CraigWardman.com
Car Leasing | Lease Cars