Here is a small series to bring you a C # in the call DLL when the failure to load a file or assembly error processing method (detailed). Small series feel very good, now share to everyone, also for everyone to make a reference. Let's take a look at it with a little knitting.
When loading a DLL, the following exception occurred: Failed to load the file or assembly "DMC3000, version=1.0.0.0, culture=neutral, Publickeytoken=null" or one of its dependencies.
An attempt was made to load a program that is not properly formatted.
After the Internet query, the reason is x64 and x86 incompatibility problem. That is, the DLL is x64, but the target platform generated by the VS default is x86, so the inconsistency between the two causes the exception to occur.
The solution is as follows:
Project, Properties----target platform->x64 (consistent with DLL platform)
The above is the content of the processing method (in detail) that failed to load a file or assembly error when calling the DLL in C #, more about topic.alibabacloud.com (www.php.cn)!