0
votes

I have a class library that I often need to debug/step-into that I distribute and use as a nuget package to Azure DevOps Artifacts feed.

To create the package, I run the following commands using nuget.exe v5.4:

nuget spec

I then enter data in the .nuspec file. Then I run:

nuget pack myLibrary.csproj -Symbols -SymbolPackageFormat snupkg

This generates both the nuget package file and the snupkg symbol file in the current working directory.

I then push this up to our Artifacts feed using the VSTS Credential Provider:

nuget push -Source "MyPackageSource" -ApiKey VSTS myLibrary.nupkg

This general spec, pack, push method works fine.

It was my understanding that pushing the .nupkg file would also push up the .snupkg symbol file with it as long as it's in the same directory as per this documentation:

You can also push both primary and symbol packages at the same time using the below command. Both .nupkg and .snupkg files need to be present in the current folder.

nuget push MyPackage.nupkg

However, after installing the package, I am not able to step-into the package code. I also don't see anything new in the package install folder. Just the standard nupkg and the dll. How do I push up the symbols and subsequently get them to install?

1

1 Answers

0
votes

You can check your logs to be sure (the log should tell you the snupkg was pushed, just as it does for nupkg files, if it was indeed pushed).

My understanding is that Azure DevOps doesn't support snupkg packages, so I expect that it does not get pushed. However, Azure Pipeline has a built-in "Index Sources & Publish Symbols task" which you can use. Rather than creating a symbols package, just point it directly to your pdbs.