Reputation: 593
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..
Upvotes: 2
Views: 8579
Reputation: 393739
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)
Upvotes: 1