title: TFS2013 Git multi-project automated build web.config transform not working
body: <p>I can't get MS Build to output a transformed <code>Web.Config</code> file. I've setup the build project using NuGet package restore as described in the <a href="http://blogs.msdn.com/b/dotnet/archive/2013/08/27/nuget-package-restore-with-team-foundation-build.aspx" rel="nofollow">NuGet docs</a>. Every part of the build works (package restore, CI, web deploy packages) except for the transform. I have tried the base setup and a <a href="http://blog.degree.no/2012/03/automatic-config-transformations/" rel="nofollow">custom project file</a> as well as lot of other options and I haven't gotten anywhere. </p>
  
  <p>I've done config transform setups before without issue. I have Slow Cheetah installed and can preview my current transform and see that it works. When I run the build locally via <code>MSBuild.exe</code>, the transform actually happens:</p>
  
  <pre><code>    TransformWebConfigCore:
    Transforming Source File: G:\MyProject\Web.config
      Applying Transform File: G:\MyProject\Web.Debug.config
      Output File: obj\Debug\TransformWebConfig\transformed\Web.config
    Transformation succeeded
  </code></pre>
  
  <p>(If I look at the -v output I can see the individual transform run)</p>
  
  <p>Then Web Deploy parameterizes my <code>web.config</code>:</p>
  
  <pre><code>Transformed Web.config using G:\MyProject\Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
  PipelineTransformPhase:
    Publish Pipeline Transform Phase
  PreAutoParameterizationWebConfigConnectionStrings:
    Creating directory "G:\MyProject\obj\Debug\CSAutoParameterize\transformed\Views\".
    Copying obj\Debug\TransformWebConfig\transformed\Web.config to obj\Debug\CSAutoParameterize\original\Web.config.
  AutoParameterizationWebConfigConnectionStringsCore:
    Transforming Source File: G:\MyProject\Views\Web.config
      Applying Transform File: &lt;?xml version="1.0"?&gt;
            &lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
              &lt;connectionStrings&gt;
                &lt;add
                  connectionString="{% token='$(ReplacableToken_#(parameter)_#(tokennumber))' xpathlocator='name' parameter='$(name)-Web.config Connection String' description='$(name) Connection String used in web.config by the application to access the database.' defaultValue='$(connectionString)' tags='SqlConnectionString' %}"
                  xdt:Transform="SetTokenizedAttributes(connectionString)" xdt:SupressWarnings="True" /&gt;
              &lt;/connectionStrings&gt;
            &lt;/configuration&gt;
      No element in the source document matches '/configuration/connectionStrings'
      Not executing SetTokenizedAttributes (transform line 6, 15)
      Output File: obj\Debug\CSAutoParameterize\transformed\Views\Web.config
    Transformation succeeded
  PostAutoParameterizationWebConfigConnectionStrings:
    Auto ConnectionString Transformed obj\Debug\TransformWebConfig\transformed\Web.config into obj\Debug\CSAutoParameterize\transformed\Web.config.
  </code></pre>
  
  <p>The parameterized file is then moved into the package and the transformed file is deleted. </p>
  
  <p>Copying obj\Debug\CSAutoParameterize\transformed\Web.config to obj\Debug\Package\PackageTmp\Web.config.
    Deleting file "obj\Debug\CSAutoParameterize\transformed\Web.config".</p>
  
  <p>So I have a transformed <code>web.config</code> file that doesn't end up in my build output. Why does the transform happen but not get copied to the output directory or the web deploy package?</p>