title: MSBuild: Update Custom Project Property
body: <p>I am trying to update the following custom property during my build (this is the custom property in one of my project files:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;TestVersion&gt;False&lt;/TestVersion&gt;
  </code></pre>
  
  <p>I have tried using UpdateElement with the MSBuild Extension Pack.  I also tried setting it with the properties settings of "SolutionToBuild" but that doesn't seem to set the value.</p>
  
  <p>Some things I have tried:</p>
  
  <pre><code>      &lt;ItemGroup&gt;
          &lt;SolutionToBuild Include="$(BuildProjectFolderPath)/../../$(SuiteSourceBranchRoot)/Source/XXX/Suite.sln"&gt;
            &lt;Targets&gt;&lt;/Targets&gt;
            &lt;Properties&gt;TestVersion=True;&lt;/Properties&gt;
            &lt;CustomPropertiesForBuild&gt;TestVersion=True;&lt;/CustomPropertiesForBuild&gt;
          &lt;/SolutionToBuild&gt;
        &lt;/ItemGroup&gt;
  
  &lt;XmlFile
    File ="$(SolutionRoot)\$(SuiteSourceBranchRoot)\Source\XXX\XXX\Sample.csproj"
    TaskAction="UpdateElement"
    XPath="/Project/PropertyGroup/TestVersion"
    InnerText="True"
    /&gt;
  </code></pre>
  
  <p>I need this value set in two projects because I have a choose when that will key off of this value.</p>
  
  <p>Thank you.</p>