是否可以使用新的csproj项目文件覆盖或清除dll构建中的调试路径? [英] Is it possible to override or clear the debug path in a dll build with new csproj project file?

查看:124
本文介绍了是否可以使用新的csproj项目文件覆盖或清除dll构建中的调试路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用dumpbin查看我的图书馆的详细信息时:
dumpbin /headers Test.dll

When using dumpbin to view details on my library:
dumpbin /headers Test.dll

我看到{{FullFolder to Test.pdb}}是pdb的完整文件夹.

I see that {{FullFolder to Test.pdb}} is the full folder to the pdb.

调试目录

    Time Type        Size      RVA  Pointer
-------- ------- -------- -------- --------
95BA9373 cv            A1 000199D4    17BD4    Format: RSDS, {4AF64893-BAF4-4FF3-9343-E8D5A55E94FF}, 1, {{FullFolder to Test.pdb}}
00000000 repro          0 00000000        0

是否可以将其排除在csproj文件中?

Is there a way to exclude this in the csproj file ?

我的.csproj如下:

My .csproj looks like:

<DebugType>full</DebugType>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
<PdbPath>none</PdbPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

似乎PdbPath元素在 new(vs2017多个框架) .csproj格式下不再起作用了吗?

And it seems that PdbPath element does not work anymore in a new (vs2017 multiple frameworks) .csproj format?

推荐答案

在roslyn 2+中为此引入的编译器标志是/pathmap或等效于csproj的PathMap属性:

The compiler flag that was introduced in roslyn 2+ for this is /pathmap or the csproj equivalent PathMap property:

<PropertyGroup>
  <PathMap>$(MSBuildProjectDirectory)=/some/dir</PathMap>
</PropertyGroup>

这篇关于是否可以使用新的csproj项目文件覆盖或清除dll构建中的调试路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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