开发者

Cannot deploy web.testing.config to the build server

开发者 https://www.devze.com 2023-02-19 15:55 出处:网络
I am learning TFS 2010 from scratch and no doubt making every mistake in t开发者_开发技巧he book.

I am learning TFS 2010 from scratch and no doubt making every mistake in t开发者_开发技巧he book.

I have created a web.testing.config for my build to the test server. In my build process I click the plus sign for "Items to Build" in "1. Required" and I specify "Any CPU | Testing". The build clean compiles but ... I still seem to be using the web.config file I use in development rather than the one I want in testing. The first line in web.testing.config is

This should ensure that any differences in this file are implemented. So I am not sure I am configuring the build properly, or if the web.testing.config is set properly.


What you are looking for is a feature called web.config transforms, and it works slightly differently.

  1. In Visual Studio right click on web.config and choose option Create Tranforms -- if you have not done this already.
  2. Read samples on using tranform syntax, the link is in the web..config created for you. You will need it.
  3. In TFS team build, create a separate step in your build template to build deployment package. The command is in this thread. This will create a deployment package -- a file with .zip extension.
  4. To deploy the package, use WebDeploy tool. It has both UI and command line if you want to make it completely automated.
0

精彩评论

暂无评论...
验证码 换一张
取 消