I have a solution converted from VS2010 to VS2012. In the Release build, I want it to produce PDB files and full debug symbols because I need to run remote debugging in a production environment.
So I set Debug Info
to full
for Release configuration. I also confirmed the followings are in the project manifest file:
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimized>true</Optimized>
But when I run MSBuild, the package it creates doesn't include the PDB files. However, if I use Visual Studio's Publish feature with Release configuration, I end up with PDB files on the target web server. What could be wrong with the Build command?
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "C:\MyWebApp.csproj"
/t:rebuild;package
/p:OutPath="C:\MyWebApp\obj"
/p:OutputPath="C:\MyWebApp\bin"
/p:Configuration=Release
/p:Platform=AnyCPU
I tried turning off the Optimized
bit, but that didn't help.
Try adding
/p:DebugSymbols=true
/p:DebugType=full
If you are publishing a web application then you should also add:
/p:ExcludeGeneratedDebugSymbol=false
You can access this straight from the command line:
msbuild.exe "C:\\MyWebApp.csproj"
/t:rebuild;package
/p:OutPath="C:\\MyWebApp\\obj"
/p:OutputPath="C:\\MyWebApp\\bin"
/p:Configuration=Release
/p:Platform=AnyCPU
/p:DebugType=pdbonly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With