Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I was looking for similar information and didn't quite find it, so I did some digging around in the .targets files that come with Visual Studio 2010 and MSBuild 4.0. I figured that was the best place to look for the MSBuild task that would perform the transformation.</p> <p>As far as I have been able to tell, the following MSBuild task is used:</p> <pre><code>&lt;Project ToolsVersion="4.0" DefaultTargets="Deploy" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll"/&gt; &lt;PropertyGroup&gt; &lt;ProjectPath&gt;C:\Path to Project\Here&lt;/ProjectPath&gt; &lt;DeployPath&gt;C:\Path to Deploy\There&lt;/DeployPath&gt; &lt;TransformInputFile&gt;$(ProjectPath)\Web.config&lt;/TransformInputFile&gt; &lt;TransformFile&gt;$(ProjectPath)\Web.$(Configuration).config&lt;/TransformFile&gt; &lt;TransformOutputFile&gt;$(DeployPath)\Web.config&lt;/TransformOutputFile&gt; &lt;StackTraceEnabled&gt;False&lt;/StackTraceEnabled&gt; &lt;/PropertyGroup&gt; &lt;Target Name="Transform"&gt; &lt;TransformXml Source="$(TransformInputFile)" Transform="$(TransformFile)" Destination="$(TransformOutputFile)" Condition="some condition here" StackTrace="$(StackTraceEnabled)" /&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre> <p>I have tested the above and can confirm that it works. You might need to tweak the structure a bit to fit with your build script better.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload