Visual Studio 2012 Website Publish Not Copying .pdb files

橙三吉。 提交于 2019-11-30 11:21:35

问题


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.


回答1:


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>



回答2:


For me this worked (in the publishing profile):

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

Or using the publishing wizard:



来源:https://stackoverflow.com/questions/19053738/visual-studio-2012-website-publish-not-copying-pdb-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!