Cannot load assembly (hr = 0x80131018)

2

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.

.net
assemblies
autocad
asked on Stack Overflow Jul 25, 2012 by user1300560 • edited Jul 25, 2012 by Pablo Claus

2 Answers

0

System.BadImageFormatException can happen if you are mismatching x86 / AnyCpu. Try to compile your assembly in x86 mode explictly and see what happens.

answered on Stack Overflow Jul 25, 2012 by Felice Pollano
0

In my case it was resource dll with Native Code whyle expected .NET resource dll. When I slip right one - everything become ok.

answered on Stack Overflow Sep 30, 2016 by user6904626

User contributions licensed under CC BY-SA 3.0