共用方式為


Visual Studio Package Load Failures - What's wrong with my package?

Anyone who has developed a package for Visual Studio has run into the dreaded package load failure.  Even after you ship you can have customers that run into this issue because the customer may be experimenting with beta releases of products that my break your package.  This issue has risen enough for us internally that I'm blogging three things you can do to look for clues on what went wrong.

1. Turn on Visual Studio Logging

  1. Shut down all instances of Visual Studio
  1. Run "Devenv.exe /log" at the command line or add as a parameter to a short cut.  The log file is written out to %USERPROFILE%\Application Data\Microsoft\Visual Studio\8.0\ActivityLog.xml
  1. Look in ActivityLog*.xml and ActitvityLog*.xsl for clues

2. Turn on Fusion Logging

  1. Shut down all instances of Visual Studio
  1. Run %(SDK)\v2.0\Bin\Fuslogvw.exe (e.g. c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\fuslogvw.exe)
  1. Click the settings button

  1. Set the settings as shown

 

5. Restart Visual Studio and repeat actions that caused the package load failure

6. Look in directory c:\fusion-log or whatever custom log path you chose for clues

3. Run Depends on the assembly

  1. Shut down all instances of Visual Studio
  2. Run %(Visual Studio)\Common7\Tools\Bin\Depends.exe
  3. Choose File, Open… and navigate to your package's assembly
  4. Look for missing files that might explain why the package could not load

Dr. Ex has blogged on the same topic with some additional things to try.