TFS 2010构建配置转换问题

发布于 2024-08-30 07:52:16 字数 568 浏览 1 评论 0原文

我在设置自动化 TFS 构建时遇到了很大的问题。基本上,我创建了名为测试的新配置,添加了转换配置,为数据库定义了不同的连接字符串。然后定义 TFS 构建,使用 MSBuild 参数 /p:DeployOnBuild=True /p:Configuration=Tests 构建整个解决方案。 问题是在放置位置(Build_PublishedWebsites\Project)中我得到 web.configweb.debug.configweb.release.configweb.tests.config,但是我希望只有一个转换后的 web.config

我已经检查了 PDC 演示文稿 Web 部署止痛药:Microsoft Visual Studio 2010 & MS Deploy 但没有帮助。

感谢您的任何答复。

I'm facing quite a problem while setting up automated TFS Builds. Basically I created new configuration called Tests, added transform config, defined different connection strings for the Database. Then defined TFS build, building whole solution with MSBuild arguments /p:DeployOnBuild=True /p:Configuration=Tests.
The problem is that in the drop location (Build_PublishedWebsites\Project) I get web.config, web.debug.config, web.release.config and web.tests.config, however I would expect just one transformed web.config.

I already checked PDC presentation Web Deployment Painkillers: Microsoft Visual Studio 2010 & MS Deploy but didn't help.

Thanks for any answer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烏雲後面有陽光 2024-09-06 07:52:16

Web.config 转换是 Visual Studio 2010 中新的 Web 发布管道 (WPP) 的一部分。

在生成过程中,执行“CopyWebApplication”目标以将网站复制到生成输出目录上的 _Websites 文件夹。由于向后兼容性原因,MSBuild 默认使用“旧”(VS2008) 复制行为,而不是新的 WPP 系统。

要选择使用 WPP,请设置以下 MSBuild 属性:

/p:UseWPP_CopyWebApplication=True
/p:PipelineDependsOnBuild=False

Web.config transforms are part of the new Web Publishing Pipeline (WPP) in Visual Studio 2010.

During the build process the "CopyWebApplication" target is executed to copy the website to the _Websites folder on the build output directory. Due to backwards compatibility reasons, MSBuild uses the "old" (VS2008) copy behavior by default and not the new WPP system.

To opt-in to using WPP, set the following MSBuild properties:

/p:UseWPP_CopyWebApplication=True
/p:PipelineDependsOnBuild=False
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文