Repository navigation
fix(pack): emit portable PDBs so nuget.org accepts the .snupkg - #35
Merged
Merged
Conversation
nuget.org rejected the NullFX.CRC 1.1.14 symbols package: "contains one or more pdbs that are not portable". All 11 PDBs were Windows (MSF 7.00) PDBs. Cause: the Release property group set <DebugType> to an empty value (it has done since 2021). With DebugSymbols=true and no DebugType, csc falls back to 'full', which on Windows writes Windows PDBs. On Linux the compiler can only write portable PDBs, which is why local Linux pack checks passed and only the Windows release build was affected. - Set <DebugType>portable</DebugType> explicitly (csc now receives /debug:portable for every target framework). - verify-package.ps1 now also opens the .snupkg: it requires a PDB for every target framework and fails if any PDB lacks the portable "BSJB" signature. CI packs on Windows for every PR, so this is caught before a release. Verified it rejects the published 1.1.14 .snupkg (11 of 11 PDBs flagged) and accepts the fixed build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C6aJYkYBV2GSnSZwsd9GU
'# Benchmarks' -> '## Benchmarks' in README.md so it matches the other sections. update-readme-benchmarks.ps1 looks for that exact heading, so its default changes with it (otherwise the next release would not find the section and would append a duplicate). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C6aJYkYBV2GSnSZwsd9GU
net8.0 and net10.0 builds warned: UnknownAlgorithmException.cs(48,98): warning SYSLIB0051: 'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete - Mark the protected (SerializationInfo, StreamingContext) constructor [Obsolete(DiagnosticId = "SYSLIB0051")] under #if NET8_0_OR_GREATER, matching how the base Exception constructor is marked. Calling an obsolete member from an obsolete member does not warn, and derived types on net8.0+ now see the same SYSLIB0051 guidance as for System.Exception. Older targets are unchanged. - Add SYSLIB0051 to NoWarn for the library project. The constructor is kept (no API removal). Verified: all 11 TFMs build with 0 warnings, the attribute is emitted only for net8.0/net10.0, and the 36 unit tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012C6aJYkYBV2GSnSZwsd9GU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: nuget.org rejected the 1.1.14 symbols package (non-portable PDBs)
This PR also changes the README
# Benchmarksheading to## Benchmarksand silences the SYSLIB0051 build warnings on net8.0/net10.0 (see the last two sections).nuget.org rejected
NullFX.CRC.1.1.14.snupkgwith "contains one or more pdbs that are not portable". All 11 PDBs in it were Windows-format (Microsoft C/C++ MSF 7.00) PDBs. The main.nupkgwas published normally.Cause
Since 2021,
NullFX.CRC.csproj's Release property group has set<DebugType>to an empty value. WithDebugSymbols=trueand noDebugType, the compiler falls back tofulldebug info, which on Windows (the release runner) writes Windows PDBs. On Linux the compiler can't write Windows PDBs and produces portable ones, so local Linux pack checks didn't show the problem.Fix
NullFX.CRC.csproj:<DebugType>portable</DebugType>. The compiler now gets/debug:portablefor all 11 target frameworks.verify-package.ps1: now also checks the.snupkg:lib/<tfm>/NullFX.CRC.pdbfor every target framework.BSJBsignature.CI packs on Windows for every PR, so a regression would fail the PR build instead of reaching nuget.org.
Validation
DebugType(Release; net10.0, net48)''before →portableafter/debug:portablefor all TFMs (22 compiler invocations)verify-package.ps1on the published 1.1.14.nupkg+.snupkgverify-package.ps1About 1.1.14
Its symbols can't be fixed after the fact. nuget.org only accepts a
.snupkgwhose PDBs match the DLLs already published, and a rebuild produces different PDB IDs. The next release (1.1.15) will publish symbols normally.README:
## BenchmarksheadingREADME.md:# Benchmarks→## Benchmarks, matching the other sections.update-readme-benchmarks.ps1: its default heading changes to## Benchmarksin the same commit. It matches the heading exactly, so without this the next release wouldn't find the section and would append a duplicate. Tested againstmain's README: one## Benchmarkssection, results replaced, everything above it unchanged.SYSLIB0051 warnings on net8.0 / net10.0
The net8.0 and net10.0 builds warned that
UnknownAlgorithmException's protected serialization constructor calls the obsoleteException(SerializationInfo, StreamingContext)constructor.UnknownAlgorithmException.cs: the protected(SerializationInfo, StreamingContext)constructor is now[Obsolete(DiagnosticId = "SYSLIB0051")], inside#if NET8_0_OR_GREATER. That matches how the baseExceptionconstructor is marked.NullFX.CRC.csproj:SYSLIB0051added toNoWarn.UnknownAlgorithmExceptionand calls this constructor now gets the same SYSLIB0051 warning it would get forSystem.Exception. Older targets are unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_012C6aJYkYBV2GSnSZwsd9GU