title: How to set web.config to "debug=false" via MSBuild Extension Pack?
body: <p>I have an WCF Service Application and the web.config is set to debug mode (debug = true):</p>
  
  <pre><code>    &lt;compilation debug="true"&gt;
          &lt;assemblies&gt;
              &lt;add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
              &lt;add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/&gt;
          &lt;/assemblies&gt;
      &lt;/compilation&gt;
  </code></pre>
  
  <p>I would like to set that to "debug=false" via MSBuild Extension Pack (version 3.5.8.0), so that the released version is always automatically in non-debug mode.</p>
  
  <p>Obviously I need to use the <a href="http://www.msbuildextensionpack.com/help/3.5.8.0/html/4009fe8c-73c1-154f-ee8c-e9fda7f5fd96.htm" rel="nofollow">XmlFile class</a>, but it doesn't do anything.<br>
  My build file looks like this:</p>
  
  <pre><code>  &lt;Target Name="Test"&gt;
      &lt;MSBuild.ExtensionPack.Xml.XmlFile TaskAction="UpdateAttribute" File="$(MSBuildProjectDirectory)\$(BuildDir)\ServiceClient\web.config" XPath="/configuration/system.web/compilation[@name='debug']" InnerText="false"/&gt;
    &lt;/Target&gt;
  </code></pre>
  
  <p>When I run the build script, I only see this:</p>
  
  <pre><code>Test:  
  XmlFile: C:\MyProject\Build\ServiceClient\web.config 
  Update Attribute: /configuration/system.web/compilation[@name='debug']. Value:
  </code></pre>
  
  <p>No errors, no warnings...nothing.<br>
  I can see that MSBuild found the web.config and did something with it, because "Date Modified" in the Explorer is set to right now, which wasn't the case before I ran the script. But there is no visible change in the file. I used a diff tool to compare the file versions before and after MSBuild, and they are identical.</p>
  
  <p>I also tried to set <code>Key</code> and <code>Value</code> instead of <code>InnerText</code>, but that doesn't help either.</p>
  
  <p>Any idea what I'm doing wrong?</p>