I have a user with issues loading a .Net assembly into AutoCAD. I get the following error:
Cannot load assembly. Error details: System.BadImageFormatException: Could not load file or assembly (hr = 0x80131018)
They are using an anit virus package called Endpoint Security and when this is turned off, the load works.
I am not a .Net expert and was hoping there might be a friendlier solution than me suggesting the user put their anti virus package in the trash!? But I've no idea where to start, any help would be greatly received.
System.BadImageFormatException can happen if you are mismatching x86 / AnyCpu. Try to compile your assembly in x86 mode explictly and see what happens.
In my case it was resource dll with Native Code whyle expected .NET resource dll. When I slip right one - everything become ok.
User contributions licensed under CC BY-SA 3.0