question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

guidance for embedding pdb in nupkg vs snupkg

See original GitHub issue

I’d like to revisit the change in guidance from https://github.com/dotnet/sourcelink/commit/f92b277cf08caf4b86425aad1fc4cdebd63c6650 as a fix to #229.

Including PDBs in the .nupkg is generally no longer recommended as it increases the size of the package and thus restore time for projects that consume your package, regardless of whether the user needs to debug through the source code of your library or not

This is only when publishing to NuGet.org. The only time a snupkg would be useful is when publishing to NuGet.org. If you are using any other NuGet feed such as:

  • Azure Artifacts NuGet feed
  • Artifactory NuGet feed
  • MyGet.org feed
  • AppVeyor feed
  • many more…

Including PDBs in the .nupkg works all of those places and NuGet.org as well. It works at every step of development. It decreases the size of the nupkg download only slightly. The same can be said for embedded XML documentation.

Symbol Servers need to retire

One of the most time frustrations for me is when Visual Studio debugger HTTP queries symbol servers for symbols when I want to debug something. I should be able to lock dependencies and have dotnet restore bring all of the available symbols asynchronously for all of the locked dependencies directly after a restore. It would be nice if all NuGet servers supported snupkg too and dotnet restore of symbols would look for snupkg first before querying Symbol Servers.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:11
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
gilescopecommented, Oct 3, 2019

The NuGet team collected numbers on this and the results show that this “slight” increase significantly affects download times in some regions.

I expect that this too would be fixed in future. Meanwhile I would gladly trade slower download times for a simpler debugging experience.

4reactions
TFTomSuncommented, Jul 17, 2019

@ctaggart I have exactly the case that I want to use local feeds and Artifactory instead of Nuget.org. Can you please point me to the current best approach to embed PDBs and source files? I want to use it for debugging as well as for code coverage analysis.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating symbol packages (.snupkg) - NuGet
You can use symbol packages (.snupkg) to distribute these symbols and improve the debugging experience of your NuGet packages.
Read more >
Symbols and Symbol Packages, Explained
nupkg is an embedded format and the most straightforward (and recommended) approach, especially with ProGet. They include the PDB and DLL inside ...
Read more >
Debugging, source code and symbols for NuGet packages
Symbols packages contain the .pdb files that link the assembly with source code. When only .symbols.nupkg packages are pushed to a feed, we...
Read more >
snupkg/symbol.nupkg local source code debugging
1 Answer 1 ... They recommend to embed pdb files in nuget .nupkg package (see Alternative PDB distribution). This will have an impact...
Read more >
Understanding Debugging Symbols and Using Source Link
Enabling Source Link in a package means two files will be made available together. The main package file with the .nupkg extension, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found