Search code examples
.netdllunmanagedloadingmanifest

Assembly Manifest loading error (.NET and C++ dlls)


My application (pure DotNET 2.0) is referencing another pure DotNET 2.0 dll which is PInvoking into an unmanaged (C++ 2005) dll. On some computers this works fine, on others there is a consistent error message:

Could not load file or assembly 
'C:\Program Files\Rhinoceros 4.0\Plug-ins\Grasshopper\rhcommon_c.dll' or one of its dependencies. 
The module was expected to contain an assembly manifest.

Assembly Manifest Error http://en.wiki.mcneel.com/content/upload/images/AssemblyManifestError.png

I've been googling this error, but it seems that other people are running into it because they have multiple files which are named the same. This is not the case here. There is only one RhinoCommon.dll and only one rhcommon_c.dll

The computer has the latest Microsoft C Runtimes installed.

Much Obliged, David


Edit: The error message was wrong. It was in fact another dll which was missing. Very weird that DotNET got so confused about this.


Solution

  • Try open your application in Dependency Walker. it should point out which of the dll's is missing.