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.
- In Visual Studio right click on web.config and choose option Create Tranforms -- if you have not done this already.
- Read samples on using tranform syntax, the link is in the web..config created for you. You will need it.
- 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.
- To deploy the package, use WebDeploy tool. It has both UI and command line if you want to make it completely automated.
精彩评论