cecil icon indicating copy to clipboard operation
cecil copied to clipboard

Cecil does not generate portable PDB checksum

Open ltrzesniewski opened this issue 6 years ago • 7 comments

Currently, Cecil does not generate a PdbChecksum debug directory entry in the assembly it writes when it produces a portable PDB file.

This entry is validated by the NuGet gallery when you try to submit a symbol package (.snupkg file), making it impossible to upload such packages for assemblies processed by Cecil.

Here's the information needed to implement this feature:

I may try to implement this in the future unless someone else is interested. 😉

Related issue: https://github.com/ltrzesniewski/InlineIL.Fody/issues/12 /cc @sakno

ltrzesniewski avatar Aug 20 '19 21:08 ltrzesniewski

I was just investigating snupkg support for my nuget libraries and ran into this too :(

Starnick avatar Feb 16 '20 01:02 Starnick

FWIW I didn't try to implement this as apparently @jbevain started to work on it in #617.

ltrzesniewski avatar Feb 16 '20 12:02 ltrzesniewski

@jbevain Is this PR done, just waiting to be merged?

Starnick avatar Feb 17 '20 23:02 Starnick

Heh, no otherwise it would be merged :)

The PR in its current state re-orders some internal implementation detail to write the debug symbols before writing the assembly as this requires computing the pdb checksum before writing it in the assembly.

jbevain avatar Feb 18 '20 18:02 jbevain

As a workaround for NuGet, and better than snupkg IMO, is to include the PDB in the main NuPkg. You can do that like this: https://github.com/clairernovotny/DeterministicBuilds/blob/master/Directory.Build.props#L10

clairernovotny avatar May 29 '20 18:05 clairernovotny

@clairernovotny , currently I'm using embedded PDB <DebugType>embedded</DebugType> as a workaround.

sakno avatar May 29 '20 19:05 sakno

@sakno that works too

clairernovotny avatar May 29 '20 19:05 clairernovotny