发布导致在最新更新后创建pdb文件。 [英] Publish causing pdb files to be created after latest update.

查看:71
本文介绍了发布导致在最新更新后创建pdb文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我将VS 2017 Professional升级到最新版本15.2(26430.6),现在当我去发布我的网站时,无论我是打开调试还是发出调试信息,它都会创建pdb文件。  它从来没有这样做过,我有
另一个用户在26430.4版本中做同样的事情。  不幸的是,我不确定在此更新发生之前我的构建版本是什么。  我可以改变什么以防止这种情况或者它是当前版本中的错误?

解决方案

您好Anthony DePinto,


感谢您在此处发帖。


>>> 我可以更改任何内容以防止此问题,还是当前版本中的错误?


PDB文件将来自调试下的发布配置。如果要阻止PDB文件发布到发布文件夹,可以编辑pubxml文件(在Web项目的Properties / PublishProfiles下),

add bin \ ** \ * .pdb (**表示bin和pdb文件之间的任何层次结构,甚至没有)到节点ExcludeFilesFromDeployment。

因此pubxml看起来像这样:

<?xml version =" 1.0"编码= QUOT; UTF-8英寸;?> 
< Project ToolsVersion =" 4.0"的xmlns = QUOT; HTTP://schemas.microsoft.com/developer/msbuild/2003">
< PropertyGroup>
<! - ... - >
< WebPublishMethod> FileSystem< / WebPublishMethod>
< ExcludeFilesFromDeployment> bin \ ** \ * .pdb< / ExcludeFilesFromDeployment>
< / PropertyGroup>
< / Project>

在这种情况下,PDB文件不会发布到发布文件夹。


Hope这可以帮到你。



Yesterday I upgraded VS 2017 Professional to the latest build Version 15.2 (26430.6) and now when I go to publish my web site it is creating pdb files no matter if I have debug turned on or emit debug information.  It never did this before and I have another user who is on the 26430.4 build where it's doing the same thing.  Unfortunately I'm not sure what build I was on before this update happened.  Anything I can change to prevent this or is it a bug in the current build?

解决方案

Hi Anthony DePinto,

Thanks for posting here.

>>>Anything I can change to prevent this or is it a bug in the current build?

The PDB files will be there from your publish configuration under debug. If you want to prevent the PDB file publish to the publish folder, you can edit the pubxml file (under Properties / PublishProfiles of your web project),
add bin\**\*.pdb (** is there to mean any hierarchy even none between bin and your pdb files) to the node ExcludeFilesFromDeployment.
The pubxml thus look like this :

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <!-- ... -->
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <ExcludeFilesFromDeployment>bin\**\*.pdb</ExcludeFilesFromDeployment>
  </PropertyGroup>
</Project>

In this case, the PDB file will not publish to the publish folder.

Hope this can help you.


这篇关于发布导致在最新更新后创建pdb文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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