How to ship a nuget package with embedded pdbs
See original GitHub issueI was wondering, what kinds of hoops I’d have to jump through to make this work?
I have a .csproj file like this:
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Embedded</DebugType>
<EmbedAllSources>True</EmbedAllSources>
</PropertyGroup>
<PropertyGroup>
<PackageId>Some.Sample.Package</PackageId>
...
</PropertyGroup>
but when using the nuget package built from this csproj using dotnet pack
and I try stepping into an API, VS asks me where to get the source file… Isn’t that supposed to be embedded?
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Include pdb files into my nuget (nupkg) files
In order to include your pdb files you just have to enter the tag <IncludeSymbols>true</IncludeSymbols> in a PropertyGroup in your project's .
Read more >Creating symbol packages (.snupkg) - NuGet
How to create NuGet symbol packages (snupkg). ... It's also possible to embed them in the dll or exe with the following project...
Read more >Two Easy Ways to Debug NuGet Packages and Edit Libraries
Embedded Symbols packages are the most straightforward and recommended approach, especially with ProGet. They include the PDB and DLL inside a ...
Read more >Debugging into NuGet packages with Source Link
In this article ... Source Link technology enables source code debugging of .NET assemblies from NuGet that ship .PDBs with links to source...
Read more >Symbols and Symbol Packages, Explained
You've heard of Symbols and Symbol packages. They're a great tool for debugging your NuGet packages – some of the most fiddly packages...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is not. The project sets
DebugType
toembedded
, which means the PDB is going to be embedded to the DLL. Furthermore, the project also setsEmbedAllSources
meaning the sources are going to be embedded into the PDB. This approach is the best when the resulting size of the DLL is not an issue, as the debugger doesn’t need to find the PDB on a symbol server and the sources on the source server. Everything is embedded in a single file (the DLL).Oh, actually, when I used “Step into specific” to step into the library methods then it asked me to disable “Just my Code” and then it worked! Cool!