Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

How to fix Visual Studio Class Designer Package load failure in VS 2005 after beta 2 uninstall

How to fix Visual Studio Class Designer Package load failure in VS 2005 after beta 2 uninstall

  • Comments 23

I have been working with Hong and Andrey on an updated version of the VS 2005 beta cleanup tool.  During the course of investigating potential problems caused by uninstalling in the "wrong" order (by which I mean uninstalling the .NET Framework 2.0 beta 2 before uninstalling other parts of VS 2005), I found an interesting issue.  There are 2 assemblies installed by VS 2005 that shipped in beta 2 with no file version information.  These files are the following:

  • Microsoft.VisualStudio.EnterpriseTools.ClassDesigner.dll
  • Microsoft.VisualStudio.EnterpriseTools.SdmDesigners.dll

When .NET Framework 2.0 beta 2 is uninstalled before VS 2005 beta 2, VS is unable to remove assemblies from the GAC because fusion binaries were removed during .NET 2.0 uninstall.  This causes all VS assemblies to be orphaned in the GAC.  Most of those assemblies will be updated in-place when installing a later build of VS 2005 because the assemblies in the later build have higher file versions.  However, these 2 assemblies do not get replaced because they were unversioned in beta 2 and have been updated to have valid file versions in later builds.  It appears that fusion will not replace an unversioned file with a versioned file in this type of scenario.

When the old beta 2 versions of these files are left in the GAC and you try to use specific features in the VS IDE, you can receive package load failures.  For example, if you open a C# Windows Application and right-click on a .cs file and choose View Class Diagram, you will receive a package load failure error for the Visual Studio Class Designer Package.

To work around this issue, you have to replace these 2 unversioned assemblies in the GAC with the versioned assemblies that ship with later builds of VS 2005.  The trick now becomes how to find these files on the VS 2005 source media.  Here is how I found them when I was verifying the fix on a test machine in our lab.  Please note that the VS 2005 troubleshooting tool will perform these steps automatically and I also posted a separate, simpler set of manual steps to fix this issue, but I am including them here for those who are interested in how I went about troubleshooting this issue.

  1. Open the VS 2005 MSI in Orca
  2. Go to the File table, press Ctrl + F and search for each of the files
  3. Take note of the Sequence value for each of them
  4. Go to the Media table and sort by LastSequence value in order to find the cab that each file is in on the VS 2005 source media
  5. Go to the VS 2005 source media and extract the files from the cabs listed in the Media table
  6. Rename each of the files after extracting them (becuase the files in the cabs will be named with the identifier from the File table and not the actual name so that Windows Installer knows how to find the files in the cab during installation)
  7. Open a cmd prompt and navigate to the proper locations in the GAC and copy the newly extracted files to the locations and overwrite the unversioned files that were left behind
  8. Relaunch VS and verify that the previously broken scenarios now work and do not show any package load failures

The GAC locations for the 2 files in question are the following:

  • %windir%\assembly\GAC_MSIL\Microsoft.VisualStudio. EnterpriseTools.ClassDesigner\\ Microsoft.VisualStudio.EnterpriseTools.ClassDesigner.dll"
  • %windir%\assembly\GAC_MSIL\Microsoft.VisualStudio. EnterpriseTools.SdmDesigners\\ Microsoft.VisualStudio.EnterpriseTools.SdmDesigners.dll"

If the above steps are too complicated, you can also use gacutil or a cmd prompt to remove the old versions of those 2 assemblies from the GAC and then run a repair of the newer version of VS 2005.  This is an easier process but will take much longer due to the time it takes to repair all of VS 2005.

After re-reading all of the above, I realized what a pain this workaround is.  Fortunately, we're nearly done automating it so that if you inadvertantly uninstall VS 2005 beta 2 without using the prescribed uninstall order, you'll be able to use the updated version of the cleanup tool to fix this.  Stay tuned for a post very soon with details about where to download the updated cleanup tool.....

<update date="11/7/2005"> Added links to automated cleanup tool and simpler set of manual cleanup instructions for this issue in case people find this blog post but not the other posts I've done about this issue </update>


  • Thanks! That fixed the problem. I had uninstalled the beta (in the wrong order) and installed the RC from the PDC. Rather than using Orca you can do a search on the PDC DVD for these two files:




    copy them to your hard drive, rename them Microsoft.VisualStudio.EnterpriseTools.ClassDesigner.dll and Microsoft.VisualStudio.EnterpriseTools.SdmDesigners.dll, respectively, and install them into the GAC using gacutil /i

    I had problems just copying the files to the locations you mentioned.

    Thanks, again!
  • Hi Lance - I'm glad to hear that this workaround fixed your computer. It is definitely easier to just search for those 2 file names as long as you know the names that they are stored in the cab files on the VS 2005 DVD. I should have included that information originally, so thank you for adding it.

    Also, please note that the version of the cleanup tool located at http://astebner.sts.winisp.net/Tools/ttool.zip will automate the steps listed above so you don't even have to manually extract the files from the cab and install them using gacutil.

  • Thanks for making this tool available. I had the same problem with VS Express and if I'd known this tool was available, I would have not gone to the trouble of uninstalling it and getting the full version.
  • I wish I would have read the entire page before I started. I didn't realize there was a happy ending at the bottom so I didn't have to do all this orca extraction and cab bs. anyway, thanks for the tool!
  • Hi John - I'm glad you got this to work but I'm sorry you went through the hassle of using Orca and extracting the files, etc. I will update this post to refer to the easier steps so they are not buried at the bottom like that.
  • ASP.NET card in IIS MMC console has dissapeared after .net framework beta 2 uninstall, how can I restore this card in my IIS?
    ASP.NET works fine with 2.0 final version, aspnet_regiis -ua and aspnet_regiis -i didn't solve this problem, ASP.NET card in IIS is still missing :(
  • > ASP.NET card in IIS MMC console has dissapeared after .net framework beta 2 uninstall, how can I restore this card in my IIS?

    Simply delete this key in registry:


  • Thanks for the tool for fixing package errors. I was getting really frustrated with Express editions.

    Also, your second tip was also useful to me. I was never able to see ASP.NET page in IIS. Everytime, MMC used to crash when I clicked on that tab. After installing Express editions, that page was gone from IIS. I was looking for that page for last two three days. And your tip worked. Thanks a ton.
  • you rock Aaron! I was so fed up after getting the new vs 2005 that I was ready to chuck the machine out the window - the tool & the IIS suggestion was exactly the ticket for a good monday!
  • I had the following error as soon as I launched visual studio "'Visual Studio Common IDE Package' has failed to load properly". I was just about to try installing the for the 3rd time after carefully removing every reference to all Visual Studio products. My error was not the same as yours, so I just deleted the entire assembly folder and installed again. Works great! This might not be the most practical solution for most people, but if your are at the end of your rope like I was, there is nothing to lose. Thanks for the help.
  • Hi Jeff - I'm glad you got this to work. For other folks reading this post, you can try the steps at http://blogs.msdn.com/astebner/archive/2005/11/09/491118.aspx before resorting to deleting your entire %windir%\assembly folder. I have seen the steps in that post work in most cases....

  • A million thank yous for supplying this VS2005 Troubleshooting Utility. I was dangerously close to pulling out what little hair I had left over this problem until I found this tool. It found and fixed exactly the package load failure problem I was encountering....

    Thanks again.
    Dale Eckert
  • Thanks for the info!

    Any idea why the above-cited VS 2005 Troubleshooting Tool might not work? In my case, on two separate Windows Server 2003 machines, I've downloaded and run the tool, and after detecting a pair of issues ("Package load failure due to assemblies left from previous install" and "Enterprise tools package load failure due to assemblies left from previous install"), it sits and spins, claiming to be working on fixing the first issue (complete with animated back-and-forth progress bar) eternally. :-(
  • Thanks, that worked perfect!!
  • Thank you!
Page 1 of 2 (23 items) 12
Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post