TFS 2012不将转换后的Web.Config复制到_PublishedWebsite [英] TFS 2012 not copying transformed Web.Config to _PublishedWebsite
问题描述
我有一个带有配置转换的Web项目.
I have a web project with a config transform.
在我的本地计算机上,构建项目后,转换工作正常.
On my local machine, when the project is built, the transform works fine.
但是,我的项目被推送到TFS并在那里构建,配置文件在主放置文件夹中转换;但是,_PublishedWebsites中的版本是原始的,未转换的版本.
However, my project is pushed to TFS and built there, the config file is transformed in the main drop folder; However, the version in _PublishedWebsites is the original, un-transformed version.
这在使用Octopack时会引起问题,因为它会将_PublishedWebsites \文件夹中的所有内容打包在一起进行部署,因此,我在部署中得到的是未转换的文件
This is causing problems when using Octopack, since it packs everything in the _PublishedWebsites\ folder to deploy, thus, I'm getting an un-transformed file in my deployment
在推送到_PublishedWebsites之前,有没有办法让TFS转换配置文件
Is there a way to make TFS transform the config file before pushing to _PublishedWebsites
修改
我们正在使用TFS 2012
Edit
We're using TFS 2012
推荐答案
基于我在这些文章中找到的信息:
Based on info I found on these articles:
- http: //www.andygeldman.com/index.php/2011/10/web-and-app-config-transformations-with-tfs-build
- http://www.vosseburcht.com/?p=79
- http://www.andygeldman.com/index.php/2011/10/web-and-app-config-transformations-with-tfs-build
- http://www.vosseburcht.com/?p=79
解决方案是添加
/p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false
我的构建参数.
现在,将转换后的Web.Config文件复制到_PublishedWebsites
Now, the transformed Web.Config file is copied to _PublishedWebsites
这篇关于TFS 2012不将转换后的Web.Config复制到_PublishedWebsite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!