Is there a way to force an “Any CPU” compiled app to run in 32bit mode on 64bit OS?

StackOverflow https://stackoverflow.com/questions/985663

  •  13-09-2019
  •  | 
  •  

Question

If I have a "Any CPU" compiled .NET app, it will run in 64bit mode on a 64bit OS.

But if I, for whatever reason, wants to force this app to run in 32bit mode. (As if it were compiled using "x86"). Recompiling is not an option, so is this possible to config at run time ? With the .manifest file perhaps?

Was it helpful?

Solution

I believe you can do this with CorFlags.exe

Something like:
CorFlags yourassembly.exe /32BIT+

Note that if the assembly is strong named you will also have to use the /force option which breaks the strong naming, so you'll then have to resign the assembly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top