I am using Visual Studio 2010 on a 64 bit Windows 7 machine.
In Visual Studio I am creating a .NET 4 Visual C# ASP.NET Empty Web Application.
I add a Default.aspx file to the project with the text "Hello World".
If I select Debug -> Start Debugging it opens a web browser and correctly displays the text.
However, if I go into Properties -> Build -> Platform Target and change it to x64.
When I select Debug -> Start Debugging it opens a web browser with the following error message:
"Could not load file or assembly 'WebApplication' or one of its dependencies. An attempt was made to load a program with an incorrect format."
"Exception Details: System.BadImageFormatException: Could not load file or assembly 'WebApplication' or one of its dependencies. An attempt was made to load a program with an incorrect format."
However, I can deploy it to a separate 64 bit windows 2008 r2 IIS server on an application pool with "Enable 32-Bit Applications" set to False and the application runs fine even if I add 64 bit .dlls to the project.
Is it not possible to debug 64 bit applications in Visual Studio using the built in Visual Studio Development Server?
In the toolbar next to the Debug dropdown I only have one option "Any CPU":
Any help on this would be greatly appreciated.