Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you need to transform your web.config on deploy then I would suggest that you take a look at <a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx" rel="nofollow">web.config transformations</a>. With these transformations when you publish from inside of VS the transformations will be automatically run for you, but since it looks like you are not deploying from VS you will need to perform some work to streamline the process. Here is what you need to do conceptually:</p> <ol> <li>Build your project</li> <li>Prepare your site for deployment</li> <li>Transform the web.config file</li> <li>Publish your site</li> </ol> <p>For step #3 you can use the TransformXml task that we ship with VS (when you select Web to be installed). Using this task is very easy, here is a sample project which demonstrates this.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt; &lt;UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll"/&gt; &lt;Target Name="TransformWebConfig"&gt; &lt;TransformXml Source="some\path\to\the\source\web.config" Transform="some\path\to\the\web.transform.config" Destination="some\path\to\the\dest\web.config" /&gt; &lt;/Target&gt; &lt;/Project&gt; </code></pre> <p>I've got a bunch of info on using this task on my blog at <a href="http://sedodream.com/SearchView.aspx?q=TransformXml" rel="nofollow">http://sedodream.com/SearchView.aspx?q=TransformXml</a>.</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