Failed to Load file or assembly "XXX" or one of its dependencies. Trying to load programs with incorrect format, loading xxx
The company changed the new machine and re-built the system. The system is still windows 2008 r2. the following error was encountered during program debugging:
Failed to Load file or assembly "ImageMagickNet" or one of its dependencies. Trying to load a program with an incorrect format
Solution: Method 1:
I couldn't remember how I solved it before. I couldn't find any reliable information on the Internet. Check the application pool settings of IIS7.5 by chance and see the following settings :(Enable 32-bit applications)
Property -- General -- enable 32-bit application to True
That's an excitement. Set it to True and everything is OK.
Method 2:
Modify project properties -- generate -- Target Platform (for example, after I change to X86, it is correct)