How to fix Visual Studio Class Designer Package load failure in VS 2005 after beta 2 uninstall
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.
- Open the VS 2005 MSI in Orca
- Go to the File table, press Ctrl + F and search for each of the files
- Take note of the Sequence value for each of them
- 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
- Go to the VS 2005 source media and extract the files from the cabs listed in the Media table
- 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)
- 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
- 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\ 8.0.0.0__b03f5f7f11d50a3a\ Microsoft.VisualStudio.EnterpriseTools.ClassDesigner.dll"
- %windir%\assembly\GAC_MSIL\Microsoft.VisualStudio. EnterpriseTools.SdmDesigners\ 8.0.0.0__b03f5f7f11d50a3a\ 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>
Comments
- Anonymous
September 30, 2005
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:
FL_Microsoft_VisualStudio_EnterpriseTools__92325_____X86.3643236F_FC70_11D3_A536_0090278A1BB8
and
FL_Microsoft_VisualStudio_EnterpriseTools__66768_____X86.3643236F_FC70_11D3_A536_0090278A1BB8
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! - Anonymous
September 30, 2005
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. - Anonymous
November 03, 2005
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. - Anonymous
November 07, 2005
The comment has been removed - Anonymous
November 07, 2005
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. - Anonymous
November 09, 2005
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 :( - Anonymous
November 09, 2005
> 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:
HKEY_CLASSES_ROOTCLSID{FD5CD8B1-6FE0-44F3-BBFB-65E3655B096E}InprocServer322.0.3600.0 - Anonymous
November 09, 2005
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. - Anonymous
November 21, 2005
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! - Anonymous
December 07, 2005
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. - Anonymous
December 07, 2005
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.... - Anonymous
December 09, 2005
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 - Anonymous
December 19, 2005
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. :-( - Anonymous
December 27, 2005
Thanks, that worked perfect!! - Anonymous
January 09, 2006
Thank you! - Anonymous
January 17, 2006
This is an answer for Tom Kiefer problem. The ttool is hanging. I also had the same problem.
I look at ttool log file under:
%temp%ttool.log
And it looks like it was trying to stop the IIS Admin service unsuccessfully. I closed this service from the services list window (And of course all my open applications, including the SQL server) and that did the trick.
If stopping the IIS admin does not solve the problem, look in your ttool.log that could give you an hint why it is hanging in your machine.
Rami - Anonymous
February 19, 2006
The comment has been removed - Anonymous
February 19, 2006
Hi Dan - I'm very sorry for this poor experience you've had with VS 2005 thusfar. Just to make sure that you see it, there is a newer post where I've listed some additional steps that have proven helpful in resolving package load failure errors in VS 2005. You can find it at http://blogs.msdn.com/astebner/archive/2005/12/16/504906.aspx.
It is definitely a bad thing to install the beta version of the .NET Framework over the top of the final release, but unfortunately there is nothing that we can do in our setup to block you from doing so. You shouldn't have to worry about some other software installation putting the beta 2 .NET Framework back on your system though - that product is only installed as part of the beta of VS 2005 or the beta of SQL 2005. So as long as you stay with the final released versions (and tell your network admin to do the same) you should be OK.
Please contact me if you run into further errors (http://blogs.msdn.com/astebner/contact.aspx) and I will try to help... - Anonymous
April 18, 2006
thanks, it do me a great favour - Anonymous
May 17, 2006
Thnaks, thanks, thanks! - Anonymous
June 10, 2006
THANKS!!! I ran the wizard and it fixed it. - Anonymous
August 05, 2006
Da sitze ich nun Samstag Nacht 2:00 Uhr und habe nun hoffentlich die Lösung für ein Problem gefunden, welches mir in den letzten zwei Wochen Kopfschmerzen bereitet hat.
Auf meinem Computer waren immer wieder Teile der VS.NET IDE zerschossen. - Anonymous
November 16, 2006
....all deleting installing reregistering didn't help in a german version .... i found the package ID that loads the classdiagramm :"DD1683A7-5A4C-4234-81B3-A4CC91DBEAC9" so i searched in the registry for it : under this key was an entry like "DontLoad" or similar ( quite selfexplaing ) i just deleted the entry NOT the key & Ahhhh = fine !!!! HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio8.0Packages{DD1683A7-5A4C-4234-81B3-A4CC91DBEAC9}