title: Set MSBuild Web Publish Property "ExcludeGeneratedDebugSymbol" from Command Line
body: <p>I'm using NAnt to build my project and publish web site project(s). I'd like to include the PDBs in the resulting package. How can I set the <code>ExcludeGeneratedDebugSymbol</code> property from the command line when I execute <code>msbuild</code>?</p>
  
  <p>I tried adding it to the list of parameters but I'm not seeing the PDBs still. My <code>exec</code> task looks like this:</p>
  
  <pre><code>&lt;exec program="${MSBuildPath}" workingdir="${path::get-full-path(PublishWebProject.SourcePath)}\"&gt;
    &lt;!-- Don't show the logo. --&gt;
    &lt;arg value="/nologo"/&gt;
    &lt;!-- Build w/o Clean --&gt;
    &lt;arg value="/t:Build"/&gt;
    &lt;!-- Configuration, Output, Options, No Warnings --&gt;
    &lt;arg value="/p:OutputPath=bin\;OutDir=${path::get-full-path(PublishWebProject.OutputPath)};Configuration=${Configuration};Platform=Any CPU;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;WarningLevel=0;RunCodeAnalysis=false;ExcludeGeneratedDebugSymbol=false"/&gt;
    &lt;!-- Quiet --&gt;
    &lt;arg value="/v:q"/&gt;
    &lt;!-- Project Path --&gt;
    &lt;arg value="${PublishWebProject.ProjectFileName}"/&gt;
  &lt;/exec&gt;
  </code></pre>
  
  <p>And here is the actual call to MSBuild:</p>
  
  <pre><code> [exec] Starting 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe (/nologo /t:Build "/p:OutputPath=bin\;OutDir=D:\Projects\XYZ\Publish\Release-Production\CommonWeb\;Configuration=Release-Production;Platform=Any CPU;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;WarningLevel=0;RunCodeAnalysis=false;ExcludeGeneratedDebugSymbol=false" /v:q CommonWeb.csproj)' in 'D:\Projects\XYZ\Source\CommonWeb\'
  </code></pre>
  
  <p>Which would equate to:</p>
  
  <pre><code>D:\Projects\XYZ\Source\CommonWeb&gt; C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /nologo /t:Build "/p:OutputPath=bin\;OutDir=D:\Projects\XYZ\Publish\Release-Production\CommonWeb\;Configuration=Release-Production;Platform=Any CPU;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;WarningLevel=0;RunCodeAnalysis=false;ExcludeGeneratedDebugSymbol=false" /v:q CommonWeb.csproj
  </code></pre>
  
  <p>I've also tried setting the <code>UseWPP_CopyWebApplication</code> to false but this didn't help either.</p>