Starting today, you can publish symbol packages to the NuGet.org symbol server. With NuGet.org as a single service provider for libraries and symbols, package authors and consumers will have a streamlined publishing and consumption experience. With a single place for managing authentication and identity, you can be sure that both the package and its symbols are coming from the same author when you consume a NuGet package from NuGet.org.
Publish a snupkg to the NuGet.org symbol server today!
We have introduced a new symbol package format -
.snupkg. You will need Visual Studio 2017 15.9 to generate portable PDBs that can be packaged as
.snupkg for publishing to the NuGet.org symbol server.
Create and publish snupkg to NuGet.org
Compile your code using Visual Studio 2017 15.9 to generate the portable PDBs.
Create the .snupkg using pack with your tool of choice. We have added a new property
SymbolPackageFormat, which must be set to
> dotnet pack MyAwesomeLib.csproj --include-symbols -p:SymbolPackageFormat=snupkg
> nuget pack MyAwesomeLib.nuspec -Symbols -SymbolPackageFormat snupkg
> msbuild /t:pack MyAwesomeLib.csproj /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
Push the .nupkg to NuGet.org (we will detect the .snupkg and push it for you)
> dotnet nuget push MyAwesomeLib.1.0.0.nupkg -s https://api.nuget.org/v3/index.json -k ~~your API key here~~
> nuget push MyAwesomeLib.1.0.1.nupkg -Source https://api.nuget.org/v3/index.json -apikey ~~your API key here~~
using nuget.org upload
Once validated and indexed, the
.snupkgwill be available for consumption and will also be downloadable from the NuGet.org gallery.
NuGet.org symbol server only accepts the new symbol package format
.snupkg. Take a look at NuGet.org symbol package constraints for more info.
Consume snupkg from NuGet.org in Visual Studio
You will need Visual Studio 2017 15.9 to consume
.snupkg from NuGet.org symbol server.
In Visual Studio, open Tools > Options > Debugging > Symbols (or Debug > Options > Symbols).
Under Symbol file (.pdb) locations, add a new symbol server location by selecting the + symbol in the toolbar. Use the following URL
Q. Can I submit a snupkg for an existing package on NuGet.org?
To upload any .snupkg to NuGet.org, the hash of the .pdb must be embedded in the .dll that is included in the matching .nupkg. If the existing .nupkg on nuget.org does not include the .pdb hash, you will need to recompile and package your .nupkg with a compiler that supports this feature (such as the one that shipped with Visual Studio 2017 15.9), and push a new version before you can submit the corresponding .snupkg.
Q. Which PDB formats are supported?
Currently, NuGet.org symbol server supports only the portable PDB format. The portable PDB format can be created and consumed for any .NET application provided that the consuming client is on .NET 4.7.1 or later. More info about Portable PDBs is available on the .NET GitHub.
We want to hear your feedback!
We want NuGet to meet the evolving needs of our community. Use the GitHub issue tracking this experience to provide feedback, or ask questions. You can also reach out me on twitter - mention @karann9 and @nuget in your tweets.