Does GitHub Packages support Nuget Symbol Packages (.snupkg)? #38678
-
Hi Does GitHub packages supports Nuget Symbol Packages (.snupkg)? https://learn.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi there @cjoergensen and welcome to our community! Thank you for asking a great question 🙂 To get started, introduce yourself in our official introduction thread |
Beta Was this translation helpful? Give feedback.
-
It's been a while since I looked into this but after some digging I discovered that GitHub does not support Nuget Symbols Packages (forget exactly where I saw that as it's been a while). I was however able to work around this by using Source Link (https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink). The trick is to embed the symbols file (.pdb) in the DLL itself instead of trying to use a separate file/package. I was able to accomplish this with the following two lines of code in the project file:
You'll also need to include a package reference to Source Link. You can find more details here: https://github.com/dotnet/sourcelink/blob/main/README.md Once I had everything configured and I pulled down the updated Nuget package, debugging just started working. Hope that helps.... |
Beta Was this translation helpful? Give feedback.
It's been a while since I looked into this but after some digging I discovered that GitHub does not support Nuget Symbols Packages (forget exactly where I saw that as it's been a while).
I was however able to work around this by using Source Link (https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink). The trick is to embed the symbols file (.pdb) in the DLL itself instead of trying to use a separate file/package. I was able to accomplish this with the following two lines of code in the project file:
<DebugType>Embedded</DebugType>
<IncludeSymbols>true</IncludeSymbols>
You'll also need to include a package reference to Source Link. You can find more details here: h…