6
votes

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.

1
Can you please post a screenshot of your Build Template, for example .. the screenshot here: weblogs.asp.net/jdanforth/archive/2010/04/24/… - Pure.Krome

1 Answers

7
votes

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