【发布时间】:2019-06-09 06:54:54
【问题描述】:
我有一个 web 项目,它有一个 web.config 和其他三个 web 配置。 web.Debug.config、web.Staging.Config 和 web.Release.config。我希望这三个配置文件到我的 VSTS CI Build Artifacts 中。我在 Visual Studio 中的解决方案资源管理器中的配置位置结构如下。
Web.config
|__Web.Debug.config
|__Web.Staging.config
|__Web.Release.config.
为了完成我的目的,我使用 Visual Studio 为这些文件设置了 Build Action 和 Copy to Output Folder 属性。所以我尝试了以下组合,但我的 VSTS CI Build Artifact 没有显示这些配置。
Build Action = Content
Copy to Output Folder = Copy If Newer
以上组合无效。比我试过的。
Build Action = Content
Copy to Output Folder = Copy Always
但是这种组合也失败了。您能否让我知道将这三个配置保留在 VSTS CI 构建工件中的正确组合。
【问题讨论】:
-
你能分享你的构建管道/定义吗?
-
虽然我不能分享,但如果你让我知道 CI/CD 管道的具体点,我将能够分享。
-
Leo Liu-MSFT 的回答对您有帮助吗?
标签: continuous-integration azure-devops configuration-files web-config-transform visual-studio-2017-build-tools