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>

 

  • Aaron,
    I get this Package Load Failure after I install the Report Designer add-in for Visual Web Developer Express. I have VS.Net 2003 installed side by side with SQL Server 2000 & RS Developer edition as also SQL Server 2005 Express. Is it such that you need to have SQL Server 2005 Standard or Workgroup or Enterprise installed for this add-in to work or is it something else? I tried out the tools given above with my Express setups, still get the same error. I just want to experiment with Express editions before I install the VS 2005 Professional/Standard editions. The OS is Windows 2000 SP4 if this has got something to do with it?

    Thanks

    Mani
  • Hi Mani - Running this on Windows 2000 should not cause the error with any greater likelihood than Windows XP or higher. Could you please try running the following command from a cmd prompt and see if it helps solve this for you:

    rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32

    If this does not work, can you please send me the output from the FSnap tool listed above? You can send it to aaronste@microsoft.com.
  • Hi Aaron,
    Also, the same problem is replicated in a Wiondows XP SP2 machine too if the Express Edition is the only edition of VS/SS 2005 installed. For a change I tried installing VWD Express 2005 on a machine that has VS 2005 Professional Edition with SS 2005 Express and the add-in worked perfectly fine without any issues, so what could be the real problem out here?

    Thanks

    Mani
  • Hi Aaron,

    I have also had similar issues with package load failures being reported.

    I have successfully run the original RD command mentioned in your notes. [I have also run the RD command mentioned in your response to Mani on Dec 09 and ended up with lots of messages about 'Access is denied' messages :-(].

    Following your instructions I then ran FSnap and identified a number of older assemblies that need to be removed.

    Using gacutil against the missing assemblies always returns 'No assemblies found matching: <dll> name'. This happens whether or not the version number is specified on the command line.

    The gacutil commands I am running are as follows:

    gacutil.exe /u microsoft.visualc.applicationverifier.dll,Version=8.0.50215.44
    gacutil.exe /u microsoft.visualstudio.qualitytools.loadtestframework.dll,Version=8.0.50215.44
    gacutil.exe /u microsoft.visualstudio.qualitytools.recorderbar.dll,Version=8.0.50215.44
    gacutil.exe /u microsoft.visualstudio.qualitytools.resource.dll,Version=8.0.50215.44
    gacutil.exe /u microsoft.visualstudio.qualitytools.unittestframework.dll,Version=8.0.50215.44
    gacutil.exe /u microsoft.visualstudio.qualitytools.webtestframework.dll,Version=8.0.50215.44
    gacutil.exe /u microsoft.visualstudio.teamsystem.performancewizard.dll,Version=8.0.50215.44

    Any help here would be greatly appreciated.

    If you need me to send you anything please contact me on brendon_bland <at> innovations.com.au.

    Regards,
    Brendon
  • Hi Brandon - Those access denied errors are most likely caused by files being in use. You can try to reboot and run the rd /s /q command again, or alternatively make sure that VS 2005 is not running when you try to run that command.

    Also, if the gacutil command is not working correctly, you may need to use a cmd prompt and manually delete those files instead of using gacutil.

    I'm sorry for the inconvenience and hassles here.
  • Aaron,

    Thanks for the speedy response.

    As you suggested, the access denied errors were solved by a reboot. The RD command ran to completion without any errors. For other readers, I did not have VS2005 running when I attempted running RD, however I had had it running prior to this so I guess that the assemblies were locked in memory by some other process.

    As reported previously the gacutil still did not run, reporting that the mentioned assemblies were not found.

    The information provided by another run of FSnap still indicated that the offending assemblies were still to be removed. These assemblies were all located in the %windir%\assembly\GAC_MSIL directory. Using Windows Explorer I could not see a subdirectory called GAC_MSIL [hidden or otherwise]. It was only when I went into the command prompt and went to %windir%\assembly and then used dir /w/p that I was able to see the GAC_MSIL directory and thence the underlying assembly subdirectories.

    Based on a guess from what you, and the other writers, have written I attempted several variations before hitting on the following approach:

    cd GAC_MSIL
    rmdir /s microsoft.visualc.applicationverifier
    rmdir /s microsoft.visualstudio.qualitytools.loadtestframework
    rmdir /s microsoft.visualstudio.qualitytools.recorderbar
    rmdir /s microsoft.visualstudio.qualitytools.resource
    rmdir /s microsoft.visualstudio.qualitytools.unittestframework
    rmdir /s microsoft.visualstudio.qualitytools.webtestframework
    rmdir /s microsoft.visualstudio.teamsystem.performancewizard

    Since I like the confirmation step I used 'rmdir /s' rather than 'rmdir /q/s' and answered Y to each of the questions.

    I then used good old dir /w/p to confirm that the assemblies were no longer present. And, just to be on the safe side, I reran FSNap and all the noted assemblies were gone from that list as well!

    So, it looks like the assemblies may now be gone and I can go back to seeing if I get any package errors. Certainly it look likes all the criteria you have documented are now met.

    As a final comment on this, the rmdir process was not really any more difficult than creating the GACUTIL commands mentioned in the previous post and was certainly more successful.

    Once again thanks for your assistance.

    Regards,
    Brendon
  • Aaron,

    I am the bearer of bad news. I left VS 2005 open for a substantial period of time to see if any pack load failures would spontanteously appear and none did. I then selected a 'recent project' and received a series of package load failures as outlined below.

    After initial selection of the project I received the message:

    Package Load Failure

    Package 'StanPackage' has failed to load properly ( GUID = {72391CE3-743A-4A55-8927-4217541F6517} ). 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.

    Then, as I was writing this blog comment another dialog popped up showing:

    Package Load Failure

    Package 'Visual Studio Common IDE Package' has failed to load properly ( GUID = {6E87CFAD-6C05-4ADF-9CD7-3B7943875B7C} ). 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.

    Then when I closed the dialogue boxes I received the following message:

    Package Load Failure

    Package 'Visual Studio Common IDE Package' has failed to load properly ( GUID = {6E87CFAD-6C05-4ADF-9CD7-3B7943875B7C} ). 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.

    I am stuck at this point. What is the appropriate course of action now? [And, unfortunately, reloading the OS is not an acceptable answer :-)]

    Regards,
    Brendon.
  • Hi Brendon - Can you please try to run this additional removal command line and see if it helps?

    Rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32

    If that does not work, I think you'll need to perform an uninstall and then some manual cleanup steps before re-installing VS 2005. These steps should allow you to do that if the above doesn't work:

    1. Uninstall all of VS 2005 using the uninstall instructions/tool at http://msdn.microsoft.com/vstudio/support/uninstall/default.aspx

    2. Click on the Start menu, choose Run and type cmd

    3. Type cd /d %windir%\assembly

    4. Type rd /s /q GAC_32 and then rd /s /q GAC_MSIL

    5. Type dir and locate any directories named NativeImages_v2.0* and type rd /s /q <directory> to delete those as well

    6. Run the steps listed at http://blogs.msdn.com/astebner/archive/2005/05/10/416223.aspx to clean up the WinSxS folder

    7. Delete any files with versions 2.0.xxxxx.xx and 8.0.xxxxx.xx

    8. Reboot

    9. Try to install VS 2005 again

    Hopefully one of the above will help. I will get these steps posted as a separate blog post later today as well because they have been used to help a few other people who ended up not having any luck with the steps in my original blog post.
  • Aaron,

    [Many hours after reading your post and working through uninstall and re-install].

    Unfortunately no good news. My apologies for the long post; I needed to ensure that the summary of events was complete and all messages were recorded and this takes a little space.

    Essentially what has been done to date is as follows"

    - There was no %windir%\assembly\NativeImages_v2.0.50727_32 to delete. I had
    previously deleted as per you prior post to Mani
    - In addition to the steps you outlined:
    Followed all steps in http://msdn.microsoft.com/vstudio/support/uninstall/default.aspx
    Performed rd /s/q %windir%\assembly\GAC_32
    Performed rd /s/q %windir%\assembly\GAC_MSIL
    No directories named NativeImages_v2.0* to delete
    Followed all steps in http://blogs.msdn.com/astebner/archive/2005/05/10/416223.aspx to clean up the WinSxS folder
    Could not find any files with versions 2.0.xxxxx.xx and 8.0.xxxxx.xx

    I also:
    Emptied %windir%\assembly\tmp
    Emptied %windir%\assembly\temp
    Removed "C:\Program Files\Microsoft Visual Studio 8" directory
    Ran a cleanup tool across the registry
    Rebooted the machine
    Defragged the drive
    Rebooted

    After this I also noticed that there were still some files left behind:
    %ProgramFiles%\CE Remote Tools
    %ProgramFiles%\Common Files\Microsoft Shared\Help 8
    %ProgramFiles%\Microsoft.Net\Primary Interop Assemblies
    I did not delete any of these files.

    I then went through the following sequence of steps:

    - Ensured no applications were running on the machine
    - Installed SQL Server Developer Edition
    [Including analysis server, reporting server, etc]
    - Did a registry clean
    - Rebooted
    - Confirmed SQL Server tools could connect to a remote database
    - Installed VS2005 [with everything except C++]
    - Did a registry clean
    - Restarted

    At this point all was looking well, even if VS had taken an exceedingly long time to install.

    Opened up VS 2005 and no messages; so far so good.

    Then I tried to open a project and received the following messages:

    Package Load Failure

    Package 'StanPackage' has failed to load properly ( GUID = {72391CE3-743A-4A55-8927-4217541F6517} ). 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.

    and

    Package Load Failure

    Package 'StanPackage' has failed to load properly ( GUID = {72391CE3-743A-4A55-8927-4217541F6517} ). 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.



    An attempt to close VS 2005 was met with the messages:

    Package Load Failure

    Package 'Microsoft.VisualStudio.QualityTools.TestCaseManagement.QualityToolsPackage, Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has failed to load properly ( GUID = {A9405AE6-9AC6-4F0E-A03F-7AFE45F6FCB7} ). 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.

    and

    Package Load Failure

    Package 'Microsoft.VisualStudio.QualityTools.TestCaseManagement.QualityToolsPackage, Microsoft.VisualStudio.QualityTools.TestCaseManagement, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has failed to load properly ( GUID = {A9405AE6-9AC6-4F0E-A03F-7AFE45F6FCB7} ). 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.



    So, unfortunately, I am no farther along than I was at the beginning.

    What do I do now????

    Regards,
    Brendon
  • Brendon,

    I was in the same position as you..nothing working, quite frustrated and ready to format my hard drive.

    I followed Aaron's most recent post, the one you followed and it worked perfectly. I am looking at your chain of events and I think what you are missing is the uninstall of Visual Studio 2005 at the very beginning of your steps. This is not refering to VS2005 Beta uninstall, but an uninstall of the stable release build - get rid of it too.

    Then follow the steps you followed. A good way to see if everything is gone is to run an FSnap, import it into Excel and search for any 2.0.* or 8.0.* - if nothing is there, go ahead and reinstall VS2005 final release.

    Good luck.
    Shaun
  • Shaun,

    Hi.

    Thanks for taking the time to read the notes and follow up with some commentary.

    I wish that the solution was that simple, what you have picked up on is more a documentation fault on my part than anything. I definitely did the uninstall of the VS2005 as part of following the steps outlined by Aaron in the http://msdn.microsoft.com/vstudio/support/uninstall/default.aspx post [it is step 13 in this list, I just checked]. Since I had long ago removed all traces of the Beta products [or so I hope] I also took his notes to mean 'do it to the product ignoring Beta' which is what I have done.

    Having said that I did not go back into the Assembly directory and rerun FSnap [so that's what Aaron meant by pt 7]. Sounds like you suspect this might be at fault?

    Educated guess from you: should I redo everything and see how it comes out?

    Regards,
    Brendon
  • Hi Brendon - I'm very sorry that you're still running into this issue. All of the cases of Package Load Failure error messages that I have seen have been caused by some kind of problem with assemblies in the GAC (%windir%\assembly). I would suggest trying to redo the steps that I sent, but to follow Shaun's suggestion to search your system using fsnap after everything is uninstalled and make sure that there are not any other assemblies leftover in the GAC. If you would like, you can send me the fsnap output and I can try to take a look before you reinstall everything again. You can send it to aaronste@microsoft.com.

    Also, did you install any VS 2005 add-ins while you had the VS beta installed? I don't recognize the "StanPackage" package so I wonder if that is installed by a 3rd party add-in and there is some kind of bug with that.
  • Still no luck, tried out everything, same thing goes for my laptop too, it just refuses to work, no matter what you try and do, my laptop has VS 2002 installed side-by-side with XP SP2 while my dev PC in office has Win2K SP4 installed and VS 2003 side-by-side, so do you think if these softwares have anything to do with the trouble? And FSnap quietly says no assemblies installed that starts with 2.0 or 8.0, so I think after those steps, everything is wiped off completely, still not sure, but the thing is ReportViewer works, I know I did the illegal thing, have a trial version of VS 2005 Professional , installed it copied the DLL's for it (found the DLL's mentione din the SQL Reporting Services forum by some Rajeev Karunakaran or someone of similar name), installed them into GAC and viewer works, as for designer I found one open source RDL Designer which would keep me company hopefully till this is done, or I can always author the RDL files as per the examples/specifications found on the MS Site, but would love to get this working if only as a challenge since work is bit slack nowadays due to holiday season!!!

    Mani
  • Hi Mani - All of the package load failures I have seen in the past have been caused by something bad left behind in the GAC (%windir%\assembly) on the machine.

    Can you please try to re-run steps 1-6 listed in my comment above and then use the Fsnap tool to gather a list of all of the files in %windir%\assembly on your system? You can find instructions for running Fsnap in step 3 of the main blog post above. After running Fsnap, please send me the output file at aaronste@microsoft.com so I can take a look...
  • Finally! Step #3 above worked for me. Thanks!
Page 2 of 4 (47 items) 1234
Leave a Comment
  • Please add 2 and 8 and type the answer here:
  • Post