Reputation: 27811
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 ExcludeGeneratedDebugSymbol
property from the command line when I execute msbuild
?
I tried adding it to the list of parameters but I'm not seeing the PDBs still. My exec
task looks like this:
<exec program="${MSBuildPath}" workingdir="${path::get-full-path(PublishWebProject.SourcePath)}\">
<!-- Don't show the logo. -->
<arg value="/nologo"/>
<!-- Build w/o Clean -->
<arg value="/t:Build"/>
<!-- Configuration, Output, Options, No Warnings -->
<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"/>
<!-- Quiet -->
<arg value="/v:q"/>
<!-- Project Path -->
<arg value="${PublishWebProject.ProjectFileName}"/>
</exec>
And here is the actual call to MSBuild:
[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\'
Which would equate to:
D:\Projects\XYZ\Source\CommonWeb> 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
I've also tried setting the UseWPP_CopyWebApplication
to false but this didn't help either.
Upvotes: 2
Views: 1977
Reputation: 7187
Your project file contains information on output debug info. Try setting debug info to pdb-only
:
<arg value="/debug:pdbonly" />
Upvotes: 0