Aaron Stebner's WebLog

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

What to do if I get package load failures in the final release of VS 2005?

What to do if I get package load failures in the final release of VS 2005?

Rate This
  • Comments 47

IMPORTANT UPDATE - I have posted an updated set of steps for working around package load failures.  Please read that blog post instead of this post because it contains additional information not listed here.  I do not want to take this post down because I want to keep the comments so others can read them, but this post is essentially obsolete due to the new blog entry I have posted.

Since the final release of Visual Studio 2005 and the .NET Framework 2.0, I have heard from several customers who have been using beta versions of VS, SQL and .NET 2.0, and have followed the uninstall steps to the best of their ability (including trying the auto-uninstall tool linked at the top of the uninstall instructions page) but are still encountering Package Load Failure error messages in the VS IDE after installing the final release.

If you currently have the final release of any version of VS 2005 installed (including the Express Editions), and you are encountering package load failures, here is what I recommend that you do to resolve these issues:

1.  Try to run the VS 2005 troubleshooting tool

Before trying the next set of steps, please download and run the VS 2005 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.

2.  Try to run the following command line to clear out the native image cache

Click on the Start menu, choose Run and type cmd, then type rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu# and press enter to remove native images from the cache.

3.  Manually search for orphaned files in the GAC

I have found that there are some cases where some additional files are getting orphaned on the machine that my test scenarios haven't caught yet (because we shipped a lot of different beta versions and I don't have the time to test out every uninstall permutation, etc).  If I haven't seen the issue in my testing, it hasn't been added to the troubleshooting tool and therefore that tool won't always be helpful.

In general, the orphaned files that cause package load failures are located in the GAC (which is located at %windir%\assembly on your machine).  So, if you have already run the troubleshooting tool and are still running into package load failures, here are some additional steps that have proven useful in identifying additional orphaned files:

  1. Download the FSnap tool and extract it to c:\fsnap.exe on your machine
  2. Run c:\fsnap.exe /bs c:\windows\assembly\ > c:\file_list.txt
  3. Look at the contents of c:\file_list.txt for any files with version number 2.0.xxxxx.xx or 8.0.xxxxx.xx where the xxxxx.xx is not equal to 50727.42
  4. Remove the files that fit this criteria using gacutil.exe (which is installed to %ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin if you have VS 2005 installed and chose to install the .NET Framework SDK tools, or can be installed by installing the .NET Framework 2.0 SDK) or by using DOS commands in a cmd prompt

I have found it useful to import the contents of c:\file_list.txt into Excel and then sort alphabetically by column G (which is the file version column).  That makes it easier to zero in on files that have suspicious version information.

Please note that you will need to change the paths in the steps above if you have your OS installed on a drive other than C.  Also, make sure that you include the trailing \ after the "assembly" folder name or else the FSnap tool will not work correctly. 

4.  Help me make the troubleshooting tool better

If you use FSnap and manually delete files and that resolves the package load failures you are seeing, I would appreciate it if you could let me know which files you removed that fixed the issue (either via the contact form or a comment on this post).  If I see common problems that the tool is not yet able to fix, I can add them to the tool and post an updated version to help everyone else out who might hit the same issue.

Hopefully this will help resolve any lingering package load failure issues that you might be seeing.  If these steps still do not work please contact me and let me know.

<update date="11/18/2005"> Added an additional step to clear out the native image cache based on findings I posted here </update>

<update date="12/16/2005"> Added an updated link to a newer set of steps at the top of this blog post </update>

 

  • Hello, I have an error in vs 2008 on Vista SP1.  I've never had vs 2005 beta or a vs 2008 beta on the machine.

    Package Load Failure

    Package 'Visual Studio Explorers and Designers Package' has failed to load properly ( GUID = {8D8529D3-625D-4496-8354-3DAD630ECC1B} ). Please contact package vendor for assistance. Application restart is recommended, due to possible environment corruption. Would you like to disable loading this package in the future? You may use 'devenv /resetskippkgs' to re-enable package loading

    Info from logged session:

     <entry>

       <record>10</record>

       <time>2008/05/26 11:46:42.776</time>

       <type>Error</type>

       <source>Microsoft Visual Studio</source>

       <description>Error checking App Path</description>

       <hr>80070005 - E_ACCESSDENIED</hr>

     </entry>

     <entry>

       <record>117</record>

       <time>2008/05/26 11:46:51.627</time>

       <type>Error</type>

       <source>Microsoft Visual Studio</source>

       <description>SetSite failed for package [Visual Studio Explorers and Designers Package]</description>

       <guid>{8D8529D3-625D-4496-8354-3DAD630ECC1B}</guid>

       <hr>80131527</hr>

       <errorinfo>COM object that has been separated from its underlying RCW cannot be used.</errorinfo>

     </entry>

     <entry>

       <record>118</record>

       <time>2008/05/26 11:46:51.631</time>

       <type>Error</type>

       <source>Microsoft Visual Studio</source>

       <description>End package load [Visual Studio Explorers and Designers Package]</description>

       <guid>{8D8529D3-625D-4496-8354-3DAD630ECC1B}</guid>

       <hr>80131527</hr>

       <errorinfo>COM object that has been separated from its underlying RCW cannot be used.</errorinfo>

     </entry>

    I have tried to repair vs.  I appreciate any suggestion.

  • Hi Jibbers42 - I'm not sure what would be causing this kind of error.  Since you are getting an access denied error, you may want to try to fix the file and registry permissions on your system.  Steps like the ones at http://blogs.msdn.com/astebner/archive/2006/09/04/solving-setup-errors-by-using-the-subinacl-tool-to-repair-file-and-registry-permissions.aspx might be helpful for that.

    If that doesn't help, then I'd suggest posting a question on one of the Visual Studio forums at http://forums.microsoft.com to see if anyone there can help suggest any other workarounds.

Page 4 of 4 (47 items) 1234
Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post