Failed to load file or assembly "XXX" or one of its dependencies. Trying to load a program that is not properly formatted

Source: Internet
Author: User
If you generate the application x86 instead of any CPU, there will be no error in the 64-bit operating system, and the following error resolution may occur on 32-bit operating systems :
The application will be born as any CPU.
Conversely, if the system is a 64-bit Win7, the new project's build target platform should be changed to x86


Comprehensive:
The build target platform for the 64-bit Win7 solution is set to x86
The build target platform for 32-bit operating system solution is set to AnyCPU

Another user's problem solving method:

I have encountered this problem two times, but the environment is different.

First time: Windows Server R2 64-bit;

Second time: Windows 7 64-bit;

Cause Analysis: The operating system is 64-bit, but the published program references some 32-bit DDL, so there is a compatibility issue.

Solution: iis--Application Pool-Advanced settings-enable 32-bit applications: true.

Failed to load file or assembly "XXX" or one of its dependencies. Trying to load a program that is not properly formatted

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.