VS 2010 XAML Design View Load always fail with a Type Load Exception RRS feed

  • Question

  • Create a new WPF project in VS and change nothing. The Design View will fail to load with the error below.

    Error    1    Could not load type 'Microsoft.Expression.DesignModel.Core.ISharedInstanceBuilder' from assembly 'Microsoft.Expression.DesignModel, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

    Microsoft.Expression.DesignModel is an assembly from Expression Blend.

    I ever installed Blend 4 RC and uninstall and install Blend 4. I Reflector the assembly I have under Blend 4 bin folder. And cannot find a interface named ISharedInstanceBuilder.

    But the WPF project is a Template project without any changes. How it get related with Blend 4? And how to fix it? Thanks.


    Wednesday, June 30, 2010 11:44 AM

All replies

  • Hi @Hugo Gu


    Looking at this error, we suspect a bad copy of this assembly somehow got into the GAC and is supplanting Visual Studio's version of the Microsoft.Expression.DesignModel assembly (the Visual Studio designer uses portions of Blend).  You can prove this by attaching a debugger or using file monitor to check the path this assembly is being loaded from.  It should be loaded from %programfiles%\microsoft visual studio 10.0\common7\ide\privateassemblies.

    The copy of the assembly in PrivateAssemblies has the required interface and is required to make the Visual Studio designer work.

    To remedy:

    1. Quit all copies of Visual Studio, then fire up an elevated Visual Studio command prompt (you should see "Visual Studio Command Prompt (2010)" under the Visual Studio folder on your start menu - right click and run it as administrator assuming you're on a Windows 7 or Windows Vista PC.

    2. In the command prompt you just started, run “gacutil /l Microsoft.Expression.DesignModel” to see if the assembly is in the GAC

    3. If it is, then run “gacutil /u Microsoft.Expression.DesignModel” to remove it from the GAC - it should NOT be there.

    4. Now try running Visual Studio again and try the action that showed the problem - it should be OK now.

    Let us know how you get on.

    It would also be interesting to understand how this happened in the first place - what actions happened on the machine immediatley before seeing this issue (installations, etc?).









    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Thursday, July 1, 2010 6:10 PM
  • Hi have the exactly same issue here, but “gacutil /l Microsoft.Expression.DesignModel” do not show any assembly.

    My install sequence was:

    1 - Install VS2010

    2 - Install Expression Blend 4 Ultimate

    (works fine)

    3 - Remove VS2010

    4 - Install Windows Phone Tools

    (not work)

    5 - Remove Windows Phone Tools

    6 - Install VS2010

    (the issue happens)

    Any ideas?

    Monday, July 12, 2010 1:37 PM
  • Jalfbr - do have have any of the following assemblies in the GAC?




    Also please try running devenv.exe /installvstemplates to see if this fixes your issue. If so, are you using a 64-bit machine?

    Monday, July 12, 2010 6:35 PM
  • I've got this same problem. None of the files in the GAC. Win7 64bit. (and I do have the phone 7 SDK too, smells like it could be the culprit) Sadly I don't have any sort of workaround.
    Friday, August 6, 2010 2:57 AM
  • Sorry to hear this @Steve_Maillet

    I assume you've tried running devenv.exe /installvstemplates from an admin command prompt?


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
    Friday, August 6, 2010 4:27 PM
  • Also have this problem - any solution? (No sign of the specified files in GAC).
    Friday, August 13, 2010 1:06 PM
  • I've tried this - didn't help. The assembly was not in GAC.

    The problem appeared after installing Silverlight 4 SDK.

    Prior to installing it I had VS2010 Ultimate, VS2010 Phone 7 and Expression Studio 4 installed.

    OS: Win7 64bit ENG Ultimate.

    PS. I've tried "devenv.exe /installvstemplates"


    Tuesday, September 7, 2010 11:20 AM
  • Hi Mark,

     I tried for the same as you explain in this forum. but still i am facing same problem.I am currently using Microsoft Visual Studio C# 2010 express edition.Suppose you want to see image then i will forward you.


    Thanks in advance...

    Friday, October 29, 2010 3:29 AM
    Tuesday, March 1, 2011 7:37 PM
  • Hi, everyone.

    The same problem after installing Silverlight 4 Toolkit. Win7 x64 Enterprise. There's no any listed assemblies in GAC, "devenv.exe /installvstemplates" makes no help.


    Any solution?

    Friday, March 4, 2011 6:52 PM
  • Hi Dennis,

    A few questions - when you say Silverlight 4 Toolkit do you mean the April 2010 one from http://silverlight.codeplex.com/releases/view/43528?

    Also can you check via command prompt the different GAC* directories under assemblies folder?



    Friday, March 4, 2011 11:18 PM
  • Andrea,


    sorry, "Microsoft Silverlight 4 Tools for Visual Studio 2010", of course:



    > can you check via command prompt the different GAC* directories under assemblies folder


    How? There's something strange with gacutil. It outputs nothing at console. Even if I type "gacutil /?" or "gacutil /l". I'm running gacutil from cmd with elevation.

    Saturday, March 5, 2011 7:34 AM
  • Is the Gacutil tool in your path? Easiest is to use the Visual Studio Command Prompt (ie. follow instructions above provided by Mark).

    Brute force way is to just navigate to each directory (ie. C:\Windows\Microsoft.NET\assembly\GAC_MSIL ) and dir to see what folders are present.

    Tuesday, March 8, 2011 1:53 AM
  • Yes, it is in my path. And yes, I'm using shortcut from start menu for VS command prompt.
    Tuesday, March 8, 2011 9:37 AM
  • Same problem, same solution: re-installation of Silverlight 4 toolkit solved the problem.


    Tuesday, April 12, 2011 9:13 AM

    This problem is common in recent times with latest releases of service pacts for Visual Studio 2010.


    This error is caused due to a bug in latest Service Packs for Visual Studio 2010 or it's components.

    If you have tried to install Visual Studio 2010 SP1 or Silverlight 4 Tools or Expression Blend 4 SP1 and if the installation has failed or rolled back. In this case, next time when they open any project (which contains designer like WPF or Silverlight) in Visual Studio then they will get this error because the latest failed setup is leaving its footprints without properly cleaning up/rolling back the partial installed entities.


    Reinstall the Service Pack 1 of your setup you have with you.

    (or) Re-Install Silverlight 4 Tools


    If the issue still persists then re-install Visual Studio 2010 SP1




    Sriram Naresh Akula




    sriram naresh
    • Proposed as answer by DavidJNoyes Wednesday, October 19, 2011 9:32 AM
    Tuesday, April 19, 2011 11:14 AM
  • Thank you, cybernaresh.


    Updating my VS2010 to sp1 and installing Silverlight SDK has fixed the problem.

    Saturday, January 28, 2012 10:22 PM