Deploy PDBs on an Azure Web Role

2019-01-18 20:01发布

问题:

I have a project that is deployed via a VS 2012 Azure Project (from right in VS, not manually). The web role project is set to build "pdb-only" Debug Info in release mode, but when deploying the PDBs are not packaged and copied to the web role VM on Azure. How do I get the PDBs to get included in the package and transmitted to the server?

The reason I want to include my PDBs in production is because I want to get line numbers in my ELMAH reports.

回答1:

I tried this out with a basic "File, New Cloud project" with the following settings:

  1. Web Project -> Properties -> Build -> Advanced -> Debug Info: pdb-only
  2. Web Project -> Properties -> Package/Publish Web -> Uncheck Exclude generated debug symbols

When I compiled and deployed a basic solution using these 2 settings, I found WebRole1.dll and WebRole1.pdb in the F:\AppRoot\Bin\ folder.

Is this what you were looking for?