3

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

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

Debug Directories

    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

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

My .csproj looks like:

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

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

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
Stef Heyenrath
  • 9,335
  • 12
  • 66
  • 121

1 Answers1

11

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>
Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217