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:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\8.0
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDN\8.0
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\MSDN\8.0

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VBExpress\8.0
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\VBExpress\8.0
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\8.0
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\VCExpress\8.0
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCSExpress\8.0
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\VCSExpress\8.0
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VJSExpress\8.0
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\VJSExpress\8.0
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VWDExpress\8.0
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\VWDExpress\8.0
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Hatteras
  • 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>

 

  • Anyone else having trouble downloading the troubleshooting tool?  After multiple attempts, the download just won't start...  Tried left-click, and right-click "Save Target As"...

    Shaun
  • Hi Marshaun - My file server is currently down for maintenance.  Please see http://blogs.msdn.com/astebner/archive/2006/06/07/621524.aspx for more details and contact information in the meantime.
  • For what it's worth...

    I was seeing package load failures while creating a Windows Mobile 5 project - the package noted in the error was 'Smart Device Project Package'.  Steps 1-3 in this topic didn't help, and before I dove into step 4, I googled and came up with this, which did the trick:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=441770&SiteID=1

    In case that link breaks in the future, here's the relevant text:

    1. For each user on the machine remove the %userprofile%\Local Settings\Application Data\Microsoft\CoreCon\1.0 Folder and all files under it.
    2. For each user on the machine rename the %userprofile%\Application Data\Microsoft\Device Emulator\ folder to %userprofile%\Application
    Data\Microsoft\Device Emulator_B2\
    3. Repair the Windows Mobile 5.0 SDKs


    I'm guessing it was primarily the WM5 SDK repair that did it.

    Shaun
  • Estoy fastidiado :-(
    Hoy se me ocurri&#243; la brillante idea de instalar en mi equipo de trabajo el Starter...
  • PingBack from http://www.eddieoneverything.com/windows-xp/working-around-the-1935-error-with-hresult-0x80131532-when-installing-visual-studio.php
  • PingBack from http://blogs.msdn.com/astebner/archive/2006/06/23/644457.aspx
  • PingBack from http://blogs.msdn.com/astebner/articles/492809.aspx
  • I found out that part of my problem with this issue was solved by using the Windows Installer Cleanup Utility to get rid of old installations.   Details here: http://brandonsrepository.blogspot.com/2006/07/package-load-failures.html
  • Thanks Aaron, 4th was a charm for me!! On one hand I was very disappointed that I had to waste two days (time that I will never get back) in getting this up and running (and I didn't even have beta version!!) but at the sametime thankful atleast I had somewhere to look ...

    Thanks again.
    Dhaval
  • 如果你是先安装 SQL Server 2005 任意一个发行版本,如果你随后卸载掉 SQL Server 2005 中自带的VS 2005开始安装其它版本的VS2005(例如专业版)的话,你绝对会遇到包加载失败的错误。
  • According to Aaron Stebner's post, the package load failures he was getting in VS2005 were mostly from having the beta version on the machine first, but in my case the beta had never been on the machine - a VPC...

  • THANK YOU AARON!!!!

    Is there anywhere I can send you a check :)

  • Hi Charlesbaldo - I'm glad that this blog post helped you.  There's no need to send me a check though, I work for Microsoft and they're already paying me  :-)

  • Hello Aaron - I never installed vs 2005 beta. I am using the VS BI version to develop SSIS package. Windows server 2003 sp2 x64. I am getting the following error message after i opened a ssis project which was developed somewhere else.

    <entry>

       <record>54</record>

       <time>2007/12/20 01:48:07.209</time>

       <type>Information</type>

       <source>Microsoft Visual Studio</source>

       <description>Begin package load [Visual Studio Data Package]</description>

       <guid>{E1AA7737-69BE-43D0-A425-E3097651E192}</guid>

     </entry>

     <entry>

       <record>55</record>

       <time>2007/12/20 01:48:07.818</time>

       <type>Error</type>

       <source>Microsoft Visual Studio</source>

       <description>CreateInstance failed for package [Visual Studio Data Package]</description>

       <guid>{E1AA7737-69BE-43D0-A425-E3097651E192}</guid>

       <hr>80131604</hr>

       <errorinfo>Exception has been thrown by the target of an invocation.</errorinfo>

     </entry>

     <entry>

       <record>56</record>

       <time>2007/12/20 01:48:07.818</time>

       <type>Error</type>

       <source>Microsoft Visual Studio</source>

       <description>End package load [Visual Studio Data Package]</description>

       <guid>{E1AA7737-69BE-43D0-A425-E3097651E192}</guid>

       <hr>80004005 - E_FAIL</hr>

       <errorinfo>Exception has been thrown by the target of an invocation.</errorinfo>

     </entry>

  • Hi Srashid01 - Do you see this error for all projects or only for this one?  I'm not familiar with SSIS - is it possible to instantiate new projects for that type instead of relying on the project that you received from someone else?  Do you get the same error for new projects of the same type?  The reason I ask is that it is possible that something in the project itself could be causing this error.

Page 3 of 5 (63 items) 12345
Leave a Comment
  • Please add 4 and 6 and type the answer here:
  • Post