NuGet packages now come with Debug symbols, Sources
The NuGet team has announced a feature that allows package authors to package their sources along with their assemblies for distribution through NuGet. This enables developers using these packages to debug through the sources of the referenced packages easily, without having to search for the source code on the project hosting server or do complicated setups.
Up until now, there really wasn’t a great way for package authors to let their users debug into the package’s binaries. The user would have needed to download the sources separately from wherever the project is hosted, making sure that they exactly match the state of the binary. They would also need to locate the matching PDBs. That’s pretty hard to get right, and most users would generally not bother.
Now with almost no additional effort, package authors can publish their symbols and sources, and package consumers can debug into them from Visual Studio.
To bring this new feature, the NuGet team worked with SymbolSource to make it easy for developers to work with both the services. The SymbolSource team had this to share on their website –
What we can finally show you today is an integrated workflow that allows effortless submission of packages to both NuGet and SymbolSource sites simultaneously. What best speaks to us developers are examples, so please consider the following commands:
1. Create a regular and a symbol/source package in one go:
NuGet.exe pack MyLibrary.csproj -Symbols
This will use the *.nuspec file included in the project file and generateMyLibrary.220.127.116.11.nupkg for NuGet.org and MyLibrary.18.104.22.168.symbols.nupkg for symbolsource.org.
2. Save your API key for easier use of NuGet.exe:
NuGet.exe SetApiKey 78a53314-c2c0-45c6-9d92-795b2096ae6c
3. Push both packages to appropriate sites in one go:
NuGet.exe push MyLibrary.22.214.171.124.nupkg
NuGet is a free, open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development.
SymbolSource is a project that aims to provide a common debugging symbols and sources server for the most popular open source projects in the .NET ecosphere.
Christophe Achouiantz Mar 11, 2014