When you make any project using Visual Studio there's usually the "Release" and the "Debug" folder, which contain the .exe files of the solutions. How do I "export" a 64bit version of that exe?
Asked
Active
Viewed 450 times
2
-
2add a new one and set it to x64 – slow Jun 05 '18 at 13:29
-
2Set the CPU architecture to x64. – Wheels73 Jun 05 '18 at 13:29
-
3The bitness does not matter, .NET programs can run on any processor. AnyCPU is a very apt name. You can force a particular jitter being used, you do that with Project > Properties > Build tab. the "Prefer 32-bit" checkbox is turned on in the standard project templates, historically the Visual Studio tooling worked better in 32-bit mode. Those days are about gone, the added support for 64-bit Edit+Continue and the x64 jitter rewrite makes it pretty unnecessary. Simply untick the option and you'll get a 64-bit process on a 64-bit operating system. – Hans Passant Jun 05 '18 at 13:51
-
1Could be considered a duplicate of this: https://stackoverflow.com/questions/12066638/what-is-the-purpose-of-the-prefer-32-bit-setting-in-visual-studio-2012-and-how – Lasse V. Karlsen Jun 05 '18 at 13:59
2 Answers
4
If you right click your project, then choose properties, under the Build option, there is an option called Platform target with a drop down, you can switch this to target Any CPU, x64, and x86. Just set this to x64 if you want it to target 64 bit only, but then you run the risk of your application not working on a 32 bit system.

Ryan Wilson
- 10,223
- 2
- 21
- 40
2
Don't forget that you should also change
Configuration
toRelease
and selectx64
again so that Debug and Release configurations are all x64.
Note:
- If your project needs a XAML designer, the designer will stop working if your project targets x64.
- You can select AnyCPU and uncheck "Prefer 32~bit" instead of x64 because it will also run as a 64-bit process in a 64-bit operating system.

walterlv
- 2,366
- 13
- 73
-
1It's better to uncheck "Prefer 32-bit" as Hans Passant has commented, that way you don't lose anything but will instead default to 64-bit process on a 64-bit operating system. – Lasse V. Karlsen Jun 05 '18 at 13:57
-
Thanks @LasseVågsætherKarlsen , I added your suggestion "uncheck Prefer 32-bit" into my answer. And I just forgot that. – walterlv Jun 05 '18 at 14:00