31
votes

I have used VS 2010 and VS2008. When I used them with my WCF Service projects, my .PDB files were always copied when I did a Publish Web Site. Now, with VS2012, no PDB files are getting copied when I do a Publish Web Site. The PDB files ARE getting created for both Debug and Release but nothing happens when I do a Publish Web Site (for either Debug or Release).

I have searched this forum (and the Internet). My solution is as follows: 1) WCF Service Library project. 2) WCF Service Web Site

When I first did a publish, I had to create a profile and I did this.

When I right-click on the WCF Service Library project and select properties, I only get tabs for Application, Build, Build Events, Debug, Resources, Services, Settings, Reference Paths, Signing, WCF Options, Code Analysis. I do NOT get tabs for Package/Publish Web and other items that I used to get. I tried to right click on my WCF Service Web Site project and there is nothing in the Property Pages to indicate this.

I have even tried to add items to my .pubxml file and that does not work.

I wouldn't think I'd need to update my Debugging options to specify Symbols location. I would think that my Publish should just "do it" like it did in 2008 and 2010. Any advice?

Thanks In Advance.

2

2 Answers

56
votes

In VS2012 Website publishing, symbols are always excluded by default. Why? It comes down to a design issue where website projects don't actually have a build configuration. If you look at the configuration manager in VS when your solution is in Release mode, the website project will always be in Debug mode; there are no other options. This is because website projects are not MSBuild based, and hence do not respect MSBuild configurations.

Instead, you can edit your .pubxml to tell it to include the symbols. Try adding this:

<PropertyGroup>
  <ExcludeGeneratedDebugSymbol>False</ExcludeGeneratedDebugSymbol>
</PropertyGroup>
14
votes

For me this worked (in the publishing profile):

<PropertyGroup>
   ...
   <DebugSymbols>True</DebugSymbols>
</PropertyGroup>

Or using the publishing wizard:

enter image description here