Aaron Stebner's WebLog

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

Definitive list of workarounds for Package Load Failure errors in Visual Studio 2005

Definitive list of workarounds for Package Load Failure errors in Visual Studio 2005

  • Comments 63

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 toolThis 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

  • Close Visual Studio and/or reboot the system to make sure that there will not be any files in use
  • Click on the Start menu, choose Run and type cmd
  • Type rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu# and press enter to remove a subset of the native images that have proven problematic in the past from the cache.

4.  Try to run the following command line to clear out all of the native image cache

  • Close Visual Studio and/or reboot the system to make sure that there will not be any files in use
  • Click on the Start menu, choose Run and type cmd
  • Type rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32 and press enter to remove all VS 2005 native images from the cache.

5.  Remove the version of VS 2005 you have installed, manually clean the system and try installing again

  • Uninstall all of VS 2005 using the uninstall instructions and automated uninstall tool
  • Click on the Start menu, choose Run and type cmd
  • Type cd /d %windir%\assembly
  • Type rd /s /q GAC_32 and then rd /s /q GAC_MSIL
  • Type dir and locate any directories named NativeImages_v2.0* and type rd /s /q <directory> to delete all VS 2005 native image directories as well
  • Using regedit.exe, remove all of the following registry sub-hives, including all registry keys and values underneath them:

  • Run this set of steps to locate and delete any files with versions 2.0.xxxxx.xx and 8.0.xxxxx.xx that are still left on your system.  Please note that all of the Package Load Failure errors that I have seen so far have been caused by files left behind in %windir%\assembly (the GAC) on the machine, so pay special attention to any leftover files in this location and make sure that all orphaned files with versions 2.0.xxxxx.xx and 8.0.xxxxx.xx are removed before attempting to reinstall VS 2005
  • Run this set of steps to clean up the WinSxS folder
  • Reboot the machine
  • Try to install VS 2005 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>


  • Thanks!  I spent a couple of days trying to get this to work... then I found this post and now everything works great!!!
  • I followed all of these steps and got rid of the messages about Package Load Failures after upgrading to the final release of Visual Studio 2005.  However, once I tried putting the beta versions of WinFX on, the error messages are back.  I installed the latest winfxsetup.exe and vsextwfx.msi files.

    The package that is failing to load when I open the toolbox window is 'PresentationDesignVisualStudio'.  Is this just an unavoidable consequence of trying to use the beta bits?  

    Thanks for putting all these steps together in one place!
  • Hi Pete - This is likely unavoidable due to the beta bits, but I'm not 100% sure.  Which beta version of WinFX are you using in this scenario?  Does that error stop happening after uninstalling WinFX?
  • Hi Aaron, thanks for the reply - I am using the latest, the Beta 2.2.  I have the stuff for Workflow Foundation, WinFX, WPF, and so on.  And yes, when I uninstall that stuff, and uninstall and reinstall Visual Studio, it goes away.  But just uninstalling the beta bits without re-doing Visual Studio, the error remains.  After re-installing VS, there is no error, but it appears as soon as I put the Beta 2.2 components back, right after the first step...winfxsetup.exe.
  • Olá...
    Obrigado pela dica do unistall, meu ambiente voltou a funcionar 100%!!!
    meu problema ocorreu na versão Professional do VS.net, fiz uma pesquisa no Google e encontrei o Blog...felizmente sempre encontramos pessoas com a boa vontade de ajudar ao proximo hehehehe.... Congratulations and Parabéns em português é claro...

  • Many thanks for your help. After following your instructions I was able to successfully install the program.
  • I ran across a blog post from Suzanne Cook this past&amp;nbsp;weekend that has been around for a while, but...
  • Maybe I'm simple but I'm confused.  After successfully uninstalling the beta (with Aaron's help) I installed VS2005 and have run into the Package Load Failure Problem.
    The VS2005 Troubleshooting tool reports no problems
    Step 2 is done and doesn't help.
    Step 3 is done and doesn't help.
    Using the link on step 4 takes me to the beta uninstall.  This seems to do something but it doesn't uninstall VS2005.
    Looking at the manual uninstall list gives a list which refers only to the Beta. It starts with "MSDN Library for Visual Studio 2005 Beta". I have an item "MSDN Library - Visual Studio 6.0". Is this the final release version of the same thing?  Do I start by uninstalling this? Where can I find instructions for uninstalling VS2005? After the pain of uninstalling the beta I'm concerned I get it right!
  • Hi Ormond - It sounds like you are looking at the instructions at http://blogs.msdn.com/astebner/archive/2005/12/16/504906.aspx to try to fix this package load failure issue.  The instructions page in step 4 (http://msdn.microsoft.com/vstudio/support/uninstall/default.aspx) will allow you to uninstall the pieces of Visual Studio 2005 that you need to remove.  The automated tool only works for beta versions, but you can use the manual instrutions to find all of the product names and then individually remove them from Add/Remove Programs.  Alternatively, you can use the tool labeled the "hammer" at http://blogs.msdn.com/astebner/archive/2005/10/27/485987.aspx to automatically remove the final release bits.  You should not need to uninstall that Visual Studio 6.0 version of MSDN.  Hope this helps.
  • Thanks, Aaron, but that page explicitly says that it is for prerelease versions, and the autouninstall too does too.  The manual list on the page is all about beta versions.
  • Hi Ormond - That page was designed to help people uninstall the beta version, but the steps are equivalent for the final released version.  The exact name of the products in Add/Remove Programs will be slightly different in some cases (they will not say "Beta" for example), but you should be able to figure out the steps you need by comparing the list of applications on that page with the list in Add/Remove Programs.

    Also, the version of the auto-uninstall tool nicknamed the "hammer" at http://blogs.msdn.com/astebner/archive/2005/10/27/485987.aspx should uninstall the final release version and not just the beta versions.

    Please try these steps out and let me know if you have any trouble.
  • Thank you!  That did it.
  • Confused. Using VS2005 for the first time. I go
    to FILE->NEW_>Project. A "project type" appears and I select C++. I then enter "WIN 32 Smart Device Project" and enter a name, oh, say, "NativeHello" which also appears in the solution name. I hit OK and I get "Project Creation Fails". Please note I'm following the MS supplied "Developing Native Applications For Pocket PC and SmartPhone Devices'.

    BTW, I can create a C# project.

    Why am I posting here? Because I uninstalled the sucker and scraped clean anything I could find. I only found these instructions tonight. Will they fix my problem?

    Also, this blog seems to have sharp folks.

  • Hi Steve - The steps on this blog post will essentially perform a full manual uninstall of Visual Studio 2005.  That can be useful in a variety of circumstances (and not just for package load failures as the title might imply).  However, I am not familiar with the type of error that you describe, so I'm not sure if these steps will help in your scenario or not.  You may want to search for similar issues on the MSDN Forums (http://forums.microsoft.com) or the Product Feedback site (http://lab.msdn.microsoft.com/productfeedback) and see if other customers have other suggestions as well.
  • Excellent!
    Thanks this saved me a lot of time after I had package load failures.
Page 2 of 5 (63 items) 12345
Leave a Comment
  • Please add 8 and 1 and type the answer here:
  • Post