I have a Windows Console Application that I need to compile as 32 bit. It's written in C# and I have all the Visual Studio 2012 updates. I've tried following several things on here, but I'm never given an option for 32 bit. How can I compile it as 32 bit?
Asked
Active
Viewed 1.2k times
2 Answers
13
With Visual Studio you are able to target what platform.
By default it will run on "Any CPU" (read 32 or 64 bit), but you can specify if you desire. Look under Project>Properties>Build and look for the "Platform Target" property.

Odrai
- 2,163
- 2
- 31
- 62
-
Okay, so it is on Any CPU. When I install the application on a 64 bit it installs fine. When I install on a 32 bit it fails and I get the error "Is not a valid Win32 Application" – user3147424 Jan 03 '14 at 17:14
-
You need to change the "Platform target" to "X86". (The application will run on a 32bit and 64 bit platform) – Odrai Jan 25 '23 at 20:24
2
The target platforms are called "X64" and "X86", where "X86" is 32bit.

nvoigt
- 75,013
- 26
- 93
- 142
-
X86 bit is what I needed. X86 will run on both 64 and 32 bit. Thanks for the help @nvoigt! – user3147424 Jan 03 '14 at 17:29