cecil
cecil copied to clipboard
Cecil does not generate portable PDB checksum
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:
PdbChecksumentry specification- Validation code used by NuGet (you can easily extract this method if you remove telemetry and output message code, and reference
System.Reflection.Metadata) - Docs about symbol package constraints
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
I was just investigating snupkg support for my nuget libraries and ran into this too :(
FWIW I didn't try to implement this as apparently @jbevain started to work on it in #617.
@jbevain Is this PR done, just waiting to be merged?
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.
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 , currently I'm using embedded PDB <DebugType>embedded</DebugType> as a workaround.
@sakno that works too