Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
Important note - the steps in this blog post have typically only proven useful in cases where a previous beta of Visual Studio 2005 was installed on the system prior to installing the final release of VS 2005. If you have never had a beta of VS 2005 on your system and are encountering package load failure errors, these steps will most likely not help. In that type of scenario, I recommend running devenv.exe with the /log switch (described in this MSDN topic) to create a log file of the packages it tries to load and then search in that log file for errors and warnings to help narrow this issue down further.
Ever since the final version of Visual Studio 2005 was released, I have been hearing from customers who are running into Package Load Failure errors while trying to get beta versions uninstalled and the final version installed. I have previously posted a set of steps that I have found will resolve nearly all cases of these Package Load Failure errors. However, there have been some cases where these steps are not enough and more in-depth manual removal steps have proven necessary. Up until now, I have been resisting posting the additional steps that are necessary in some cases because I really want folks to try out the other steps I have posted first. However, I am going to go ahead and post a complete set of steps and just duplicate my previous steps in an effort to communicate the workarounds I have found as widely as possible while also making my best effort to make things as easy as possible for the majority of customers.
So, without further ado, here is a complete, hopefully definitive set of steps that will help resolve all Package Load Failure errors seen while trying to use the final release of VS 2005 on a system that previously had a beta version installed. Please try these steps in the order listed and check to see if the Package Load Failure errors are resolved after completing each step so that you can try to avoid needing to perform more removal steps than are strictly necessary on your system.
Please note - if you have Dotfuscator 3.0 installed on your system, you should first try the workaround described here to see if you are running into a known issue that has been fixed by Preemptive (the company that produces Dotfuscator).
1. Try to repair the .NET Framework 2.0
Sometimes, package load failures have a very simple cause - the .NET Framework 2.0 is somehow in a broken state. Before trying any of the more complicated steps listed below, it is worth trying to repair the .NET Framework 2.0. To do this, go to the Add/Remove Programs control panel, locate the item named Microsoft .NET Framework 2.0 and choose to repair it.
2. Try to run the VS 2005 beta uninstall troubleshooting tool
Before trying any of the manual steps listed below in this blog post, please download and run the VS 2005 beta uninstall troubleshooting tool. This tool is built on the same code base as the auto-uninstall tool, but it has knowledge of some specific problems that existed in previous beta versions of VS 2005 and knows how to go in and surgically clean them up.
3. Try to run the following command line to clear out parts of the native image cache
4. Try to run the following command line to clear out all of the native image cache
5. Remove the version of VS 2005 you have installed, manually clean the system and try installing again
If none of the above steps work for you, please leave a comment on this blog post or contact me and I will try my best to help you further.
<update date="12/19/2005"> Added a new step to remove some registry data related to VS 2005 as part of step 4 above </update>
<update date="1/10/2006"> Added link to information about a package load failure scenario caused by Dotfuscator 3.0 </update>
<update date="1/15/2006"> I have seen a couple of issues caused by orphaned keys under the Express Edition hives and the MSDN hives, so I added those to the list in step 4 above </update>
<update date="11/18/2006"> Added a new first step to try repairing the .NET Framework 2.0 </update>
<update date="4/2/2008"> Added caveat that the steps in this post are typically only useful when a beta of VS 2005 was previously installed on the system. </update>
<update date="4/24/2009"> Fixed broken link to the VS 2005 beta uninstall troubleshooting tool. </update>