TFS 2010构建配置转换问题
我在设置自动化 TFS 构建时遇到了很大的问题。基本上,我创建了名为测试的新配置,添加了转换配置,为数据库定义了不同的连接字符串。然后定义 TFS 构建,使用 MSBuild 参数 /p:DeployOnBuild=True /p:Configuration=Tests
构建整个解决方案。 问题是在放置位置(Build_PublishedWebsites\Project)中我得到 web.config
、web.debug.config
、web.release.config
和 web.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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Web.config 转换是 Visual Studio 2010 中新的 Web 发布管道 (WPP) 的一部分。
在生成过程中,执行“CopyWebApplication”目标以将网站复制到生成输出目录上的 _Websites 文件夹。由于向后兼容性原因,MSBuild 默认使用“旧”(VS2008) 复制行为,而不是新的 WPP 系统。
要选择使用 WPP,请设置以下 MSBuild 属性:
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: