When you publish an ASP. Win7 64-bit system IIS8.0 today, you are prompted to "fail to load the file or assembly" Oscommunicationlib "or one of its dependencies. An attempt was made to load a program that is not properly formatted. "Error, and finally resolved this issue by modifying the IIS configuration, hoping to help people who have encountered the same problem.
Error message:
Solution:
1. Find the application pool used by the site
2. Open the application pool used by the site, click "Advanced Settings", set the "Enable 32-bit Application" option to True
The reason is that the target platform generated by the referenced OSCommunicationLib.dll class library is x86, so it is incompatible in a 64-bit system, enabling a 32-bit application to be compatible with the x86 platform's assemblies
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Failed to load file or assembly "Oscommunicationlib" or one of its dependencies. An attempt was made to load a program that is not properly formatted.