【问题标题】:How to separate the dev and production *.sln for Visual Studio 2013 projects如何分离 Visual Studio 2013 项目的开发和生产 *.sln
【发布时间】:2014-07-21 03:01:28
【问题描述】:

我已经在 J​​enkins CI 上设置了我的应用程序发布流程。构建命令是:

"c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" foo.sln /Rebuild "Release" /Out log.txt

优化标志 (/LTCG /OPT:REF /OPT:ICF) 在 foo.sln 中启用。

当我在我的机器上开发时,我想禁用这些标志(以便增量构建可用)以减少构建时间。我的问题是我必须从版本控制系统(在我的例子中是 Perforce)中检查 foo.sln,禁用标志。但是,每当我需要签入对 foo.sln 的任何更改时,我都必须在签入之前和提交之后切换优化标志。所以我的本地设置不会被签入。有没有办法让这个过程更容易(避免切换本地设置)?

我在 SO 上发现了一些类似的问题,但这些问题是针对 Web.config/App.config 的。不适用于 foo.sln 解决方案文件。

Using different Web.config in development and production environment

How to select different app.config for several build configurations

【问题讨论】:

    标签: build visual-studio-2013 continuous-integration release-management


    【解决方案1】:

    VS 解决方案从两个标准配置开始,调试和发布。如果您需要另一个并且 Debug 不够好,那么只需添加它。

    使用构建 + 配置管理器。左上角的组合框标记为“Active Solution Configuration”,选择“New”。给它一个独特的名称并从 Release 复制。更改您想要不同的设置。相应地更改您的构建命令。

    【讨论】:

      猜你喜欢
      • 2015-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-12
      • 2012-11-05
      • 2018-04-28
      • 1970-01-01
      • 2014-01-19
      相关资源
      最近更新 更多