Visual Studio 2012 网站发布不复制 .pdb 文件 [英] Visual Studio 2012 Website Publish Not Copying .pdb files

查看:37
本文介绍了Visual Studio 2012 网站发布不复制 .pdb 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用过 VS 2010 和 VS2008.当我将它们用于我的 WCF 服务项目时,我的 .PDB 文件总是在我发布网站时被复制.现在,使用 VS2012,当我发布网站时不会复制 PDB 文件.正在为调试和发布创建 PDB 文件,但是当我执行发布网站(对于调试或发布)时没有任何反应.

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).

我搜索过这个论坛(和互联网).我的解决方案如下:1) WCF 服务库项目.2) WCF服务网站

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.

当我右键单击 WCF 服务库项目并选择属性时,我只获得了应用程序、构建、构建事件、调试、资源、服务、设置、引用路径、签名、WCF 选项、代码分析的选项卡.我没有获得打包/发布 Web 和我过去获得的其他项目的标签.我试图右键单击我的 WCF 服务网站项目,但在属性页中没有任何内容表明这一点.

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.

我什至尝试将项目添加到我的 .pubxml 文件中,但这不起作用.

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

我认为我不需要更新我的调试选项来指定符号位置.我认为我的发布应该像 2008 年和 2010 年那样做".有什么建议吗?

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?

提前致谢.

推荐答案

在 VS2012 网站发布中,默认情况下总是排除符号.为什么?这归结为网站项目实际上没有构建配置的设计问题.如果你的解决方案处于Release模式时查看VS中的配置管理器,网站项目将始终处于Debug模式;没有其他选择.这是因为网站项目不是基于 MSBuild,因此不尊重 MSBuild 配置.

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.

相反,您可以编辑 .pubxml 以告诉它包含符号.尝试添加此内容:

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

<PropertyGroup>
  <ExcludeGeneratedDebugSymbol>False</ExcludeGeneratedDebugSymbol>
</PropertyGroup>

这篇关于Visual Studio 2012 网站发布不复制 .pdb 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆