在 VS2010 中具有多个构建配置的一个项目? [英] one project with multiple build configurations in VS2010?

查看:30
本文介绍了在 VS2010 中具有多个构建配置的一个项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 c# windows 应用程序项目.我想构建两个 .exe 文件,一个在 64 位操作系统上以 64 位运行(通过面向任何 CPU"的平台),另一个在 64 位操作系统上以 32 位运行(通过面向 x86 的平台).

I have a c# windows application project. I want to build two .exe files, one is run as 64bit on 64 bit OS (by platform targeting 'Any CPU'), the other is run as 32 bit on 64 bit OS (by platform targeting x86).

目前,我应该在需要其他配置时更改我的构建配置,并重命名编译文件以区分 32 和 64.

Currently, I should change my build configuration whenever i need the other configuration, and rename the compiled file to distinguish between 32 and 64.

有没有更简单的方法来管理多个配置?

Is there an easier way to manage multiple configurations?

推荐答案

创建 32 位构建和 64 位构建.这将允许您将它们放在不同的文件夹中.

Create a 32 bit build and 64 bit build. This will allow you to have them put in different folders.

右键单击解决方案,选择配置管理器"在 Active Solution Configuration 中选择new"称之为 32 位构建在 CPU 下拉菜单中选择 32 位选项.

Right click on the solution, choose "Configuration Manager" In the Active Solution Configuration choose "new" Call it 32-Bit Build Pick the 32 bit option in the CPU dropdown.

重复并将其命名为 64 位版本.

Repeat and name it 64-Bit build.

现在,当您进行构建时,它将转到 C:DevelopmentProjectNameBin32-Bit Buildprogramname.exe或类似的 64 位

Now when you do a build it will go to C:DevelopmentProjectNameBin32-Bit Buildprogramname.exe or similarly for 64 bit

这篇关于在 VS2010 中具有多个构建配置的一个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆