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

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

问题描述

我有一个C#Windows应用程序项目。我想构建两个.exe文件,一个文件在64位OS上以64位运行(通过针对任何CPU的平台),另一个文件在64位OS上以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.

右键单击解决方案,选择配置管理器
在活动解决方案中配置选择新
称其为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-

现在,当您进行构建时,它将转到C:\Development\ProjectName\Bin\32Bit Build\programname.exe。
或类似的64位元

Now when you do a build it will go to C:\Development\ProjectName\Bin\32-Bit Build\programname.exe or similarly for 64 bit

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

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