Could not load file or assembly or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description:
Switched my development environment from 32-bit to 64-bit.
This message being spewed-forth by an asp.net application means that the DLL concerned has been compiled as a specific "bitness", but one that doesn't match that which IIS is running at. The most usual reason for this is an assembly marked as "x86" deployed to an "x64" server.
Exception:
Could not load file or assembly 'SysDiagnostic, Version=2.0.000.0, Culture=neutral, PublicKeyToken=abc123456789' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Resolve:
Simply follow the steps below :
- open project properties window.
- select Build tab
- Change it to ‘Any CPU’
- Save your changes.
- Compile your project and run :)
Go to the IIS7 Application Pool -> advanced settings and set the 32-bit application to true.
Resources:
Solved
Solved 2
Brak komentarzy:
Prześlij komentarz