问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/985663/is-there-a-way-to-force-an-any-cpu-compiled-app-to-run-in-32bit-mode-on-64bit