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 verifying add-in with referenced assemblies from Visual Studio not in the GAC

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio 2005
Date: June 2009   Microsoft Visual Studio 2008
       

Introduction

When using the peverify.exe tool of the .NET Framework 2.0 SDK to verify an add-in that references a Visual Studio assembly not in the Global Assembly Cache (GAC) but in the installation folder of Visual Studio (such as Microsoft.VisualStudio.Data.Interop.dll), you get this error:

Error 0x80070002 "The system cannot find the file specified"

Notice that the referenced assembly should have the Copy Local property set to False because assemblies in the installation folder of Visual Studio should not be redistributed. The referenced assembly will be located correctly when the add-in is hosted in Visual Studio. It won't be found when verifying it with the peverify.exe tool, though.

More Information

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 that specifies the file path of the referenced assembly (adjust the items in bold face):
Language: XML   Copy Code Copy Code (IE only)
<?xml version="1.0" ?>
<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="Microsoft.VisualStudio.Data.Interop" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
            <codeBase version="9.0.0.0" href="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Microsoft.VisualStudio.Data.Interop.dll" />
         </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.

Related articles


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