2

I built my dll in a 64Bit machine with Office2010 64Bit, when i use that dll in a 32bit(xp/office2003) machine am getting this error.

Could not load file or assembly 'Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

I have reference of VBIDE in my project, Looks like based on the office version installed in the PC where Project is being built - the version of Vbe.Interop gets recorded in the dll. How can I avoid this - ie, environment neutral build..

Thanks in advance..

sehe
  • 374,641
  • 47
  • 450
  • 633
user1066231
  • 551
  • 1
  • 7
  • 27

1 Answers1

1

Ruled out: ---You might have copied the required assemblies from somewhere. But the .NET assembly Microsoft.Vbe.Interop will require other (native) DLLs to be present. These are probably not present on your system.

I think you may need to install a version of Microsoft Office in order to fix this.----

To trouble shoot what gets loaded, and what the fusion loader looks for (native) DLLs, turn on fusion logging in the registry:

Add the following values to

 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion

Add:

 DWORD ForceLog set value to 1
 DWORD LogFailures set value to 1
 DWORD LogResourceBinds set value to 1
 String LogPath set value to folder for logs e.g. C:\FusionLog\

This folder must exist, and end with the backslash

(instructions copied from How to enable assembly bind failure logging (Fusion) in .NET)

Community
  • 1
  • 1
sehe
  • 374,641
  • 47
  • 450
  • 633
  • Microsoft office is available in both the systems(where i build and where I install my app). version 14.0.0 of VBIDE is from Office 2010 where as the PC where I install my build has office 2003 (ie, VBIDE version 12.0.0) - ill try fusion log too – user1066231 Oct 11 '12 at 04:05