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?
Asked
Active
Viewed 6,921 times
3 Answers
10
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
- 554,122
- 78
- 1,158
- 1,373
0
Found it. Need to change the corflags using corflags.exe as this blog explains.

statenjason
- 5,140
- 1
- 32
- 36
-
Updated the link to a similar blog entry. – statenjason Jan 09 '11 at 09:24