Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a WinForms app be configured to run as "x86" without recompiling?

Can a WinForms app compiled for "Any CPU" be configured to run as "x86" on a 64-bit server without recompiling the app? Specifically, I'm looking for an app.config setting or Control Panel applet to accomplish this end. All the customer's clients are x86, but the server is x64, and we like to install the WinForms app on the server for administrators to configure and monitor the system. We would much rather not recompile just for the server.

like image 912
flipdoubt Avatar asked Dec 17 '22 10:12

flipdoubt


1 Answers

From http://www.request-response.com/blog/PermaLink,guid,34966ef8-3142-46b2-84e0-372b5c36ddcc.aspx

You can, however, control and override this default behaviour even after your code has been compiled. There's a handy tool called corflags.exe present in the SDK that allows you to force 'anycpu' compiled code to use 32-bit process in 64-bit world.

The usage of this utility is found here http://msdn.microsoft.com/en-us/library/ms164699(VS.80).aspx

like image 191
Rory Becker Avatar answered Dec 29 '22 00:12

Rory Becker