Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying PDB Files in Release

I have my CI server setup to build and deploy all of my environments including my production environment. From what I can tell my setup for all of my project files and CI settings are the same between my Staging environment build and my Production environment build. But when I deploy to production there are no PDB files sitting alongside the DLL files like there are in staging. Here is the script that deploys each application:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe %location% ^
    /p:Configuration=%configName% ^
    /p:DeployOnBuild=True ^
    /p:DeployTarget=MSDeployPublish ^
    /p:AllowUntrustedCertificate=True ^
    /p:MSDeployPublishMethod=WMSvc ^
    /p:CreatePackageOnPublish=True ^
    /p:MsDeployServiceUrl=https://%serverName%:8172/MsDeploy.axd ^
    /p:DeployIisAppPath=%siteName% ^
    /p:UserName=%username% ^
    /p:Password=%password%

So it seems like when the Configuration=Release the PDB files are left behind, though they are getting generated on the build server. Any ideas?

like image 547
Hungry Beast Avatar asked Sep 10 '25 17:09

Hungry Beast


2 Answers

If you want to include the pdb files with the publish, go the project properties and Package/Publish Web Tab, Uncheck the "Exclude Generated Debug Symbols" Settings

like image 100
Naresh Jois Avatar answered Sep 12 '25 13:09

Naresh Jois


if you want to include the pdb files on deploy(publish) even if for Release, add following property to the project file:

<ExcludeGeneratedDebugSymbol>False</ExcludeGeneratedDebugSymbol>
like image 35
Bakhodir Kurbanov Avatar answered Sep 12 '25 13:09

Bakhodir Kurbanov