How to apply Web.config transformations during TFS build.

Just a simple reminder to myself, becauseĀ I already had to look this up twice:

If you want a project’s web.config files to use transformations as it would when you hit deploy in VS, you need to set the following MSBuild arguments in your Team Build definition:

/p:UseWPP_CopyWebApplication=True /p:PipelineDependsOnBuild=False

And it looks like this:

3 thoughts on “How to apply Web.config transformations during TFS build.

  1. Benjamin


    I get the following error when I use the MSBUILD settings(/p:UseWPP_CopyWebApplication=True /p:PipelineDependsOnBuild=False):
    ASPNETCOMPILER: The directory ‘C:abin_PublishedWebsitesProject.Web’ doesn’t exist.

    I use a TFS cloud solution.

    1. Benjamin

      Solved it by using the following command:
      /p:DeployOnBuild=true /p:UseWPP_CopyWebApplication=True /p:PipelineDependsOnBuild=False

  2. Pushkar

    Hi Benjamin,

    I am getting weird error during RM release. Package location ‘#/895/dropbin_PublishedWebSitesMyWebSite’ doesnt not exist or Deployer user does not have access. I have set option “Copy build output to Server” in build definition and Build with application option in RM component.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.