I am using VS Enterprise update 3 - 64 bit version on Windows server 2008. The Issue I am facing is that when a web application created in platform 32 bit changed to 64 bit, the applications fails runnung. By following these steps with no code added causes the following error.
- Fire up VS 2015 Enterprise
- create a new web application with 4.6.1 framework with name as DefautTest, select Web API option in the next window
- Once the project is created, right click the project and navigate to Project properties and goto Build tab.
- In the Build tab, change the Platform target from Any CPU to x64
- run the application to get this error.
Server Error in '/' Application.
Could not load file or assembly 'DefaultTest' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Description: An
unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'DefaultTest' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |