views:

390

answers:

4

Is there a way to execute a .net application compiled under AnyCPU as a 32-bit application when running in a 64-bit Windows environment without recompiling as x86?

A: 

Check out this question

Steven Sudit
The question I linked to mentions corflags as well as some other options.
Steven Sudit
+6  A: 

You can use corflags with the /32bit+ option.

Jonathan
A: 

Found it. Need to change the corflags using corflags.exe as this blog explains.

statenjason
+3  A: 

You can use CorFlags to change the bit without compiling, but you need to modify the application itself to run it. There is no way to just run the app as 32bit directly.

Alternatively, if you do not want to change the .exe at all, you can make a 32bit compiled application that loads the assembly and starts its entry point. Since you're loading the assembly into a running 32bit application, it will run as 32bit.

Reed Copsey