简体   繁体   English

如何从解决方案中获取64位exe文件?

[英]How to get a 64bit exe file from the solution?

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. 使用Visual Studio进行任何项目时,通常都有“ Release”和“ Debug”文件夹,其中包含解决方案的.exe文件。 How do I "export" a 64bit version of that exe? 如何“导出”该exe的64位版本?

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. 如果右键单击项目,然后选择“属性”,则在“构建”选项下,有一个名为“平台目标”的选项,并带有一个下拉菜单,您可以将其切换为目标“任何CPU,x64和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. 如果只希望将它定位为64位,则将其设置为x64,但是这样会冒应用程序无法在32位系统上运行的风险。

  1. Right-click your project and select Properties : 右键单击您的项目,然后选择Properties 右键单击您的项目

  2. On your Build tab, select Platform target to x64 : 在“ Build选项卡上,选择“ Platform targetx64 选择x64

  3. Don't forget that you should also change Configuration to Release and select x64 again so that Debug and Release configurations are all x64. 不要忘记,您还应该将Configuration更改为Release然后再次选择x64 ,以便Debug和Release配置都是x64。 在发布时选择x64


Note: 注意:

  1. If your project needs a XAML designer, the designer will stop working if your project targets x64. 如果您的项目需要XAML设计器,那么如果您的项目面向x64,设计器将停止工作。
  2. 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. 您可以选择AnyCPU并取消选中“ Prefer 32〜bit”而不是x64,因为它也将在64位操作系统中作为64位进程运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM