Ver versión en español    
 
Home
10 Reasons to use MZ-Tools
MZ-Tools 6.0 for VS.NET
Editions
Features
Online Documentation
MZ-Tools SDK
Download
Purchase
Version History (RSS)  
FAQ & Support
MZ-Tools 3.0 for VB6 & VBA
Features
Online Documentation
Download (freeware)
Donations (Paypal)
Version History (RSS)  
FAQ & Support
User Reviews
Community Place
Contact  
For Add-In Developers
About
   
 
User Testimonials

I'm an avid supporter of MZ-Tools. It's a product I couldn't do without and your level of support is outstanding.

Jan Hyde (Visual Basic MVP)

You will soon wonder how you ever lived without it.

Andy Maggs

More user reviews
 
PRB: PEVerify.exe causes problem with EnvDTE.dll verifying Visual Studio 2005 add-ins

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio 2005
Date: September 2007  
     

Introduction

When using the peverify.exe tool of the .NET Framework 2.0 SDK to verify Visual Studio 2005 add-ins, you can get errors like these:

  • [found ref 'EnvDTE.ProjectItem'][expected ref 'EnvDTE.ProjectItem'] Unexpected type on the stack.
  • [found ref 'EnvDTE.Project'][expected ref 'EnvDTE.Project'] Unexpected type on the stack.
  • Unable to resolve token.
  • Etc.

More Information

This problem happens if your add-in uses the VSLangProj.dll, because that assembly references EnvDTE.dll version 7.0.3300.0 while Visual Studio 2005 add-ins reference EnvDTE.dll version 8.0.0.0.

To solve this problem:

  • If your add-in dll is named "myaddin.dll", create a text file with the name "myaddin.dll.config"
  • Place this content inside that config file (no changes to the content are required):
<?xml version="1.0" ?>
<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
         <probing privatePath="PublicAssemblies;PrivateAssemblies" />
         <dependentAssembly>
            <assemblyIdentity name="EnvDTE" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <bindingRedirect oldVersion="7.0.3300.0" newVersion="8.0.0.0" />
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

Once that file is placed in the same folder than the add-in dll, the peverify.exe tool will work fine.

Note: Visual Studio 2005 has a "devenv.exe.config" file in the "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" folder that does the same for things to work fine in the IDE.

 

Go back to the 'Resources for Visual Studio .NET extensibility' section for more articles like this

MZ-Tools 6.0 for Visual Studio .NET

You can code, design, locate code and document your apps much faster using VB.NET, C#, C++ or Visual J#:

Buy MZ-Tools Now Download MZ-Tools Demo

   Top