1
votes

The end scenario I am trying to tackle is debugging a NuGet package we develop and publish to our feed in Azure DevOps, when referenced from a different package. E.g. package A is released via a pipeline to an Azure DevOps NuGet feed. I am using it from package B, and want to be able to debug code inside A using Visual Studio.

Problem is dotnet pack --include-symbols does not include A's symbols into the .nupkg. Instead, it puts them into .symbols.nupkg, which are not getting pushed by dotnet push to our DevOps feed. There's a conflict unless I explicitly exclude .symbols.nupkg:

Response status code does not indicate success: 409 (Conflict - The feed already contains 'A 0.0.0-REDACTED'. (DevOps Activity ID: A7965FB9-B458-43F9-8973-FD0B6E7F1138)).

The question is twofold:

  1. Is there a supported and well documented way to get debug symbols (and, preferably sources) automatically loaded in Visual Studio for a NuGet package build by CI in Azure DevOps?
  2. If what I am trying to do is the correct way, how do I deal with .symbols.nupkg?
2

2 Answers

1
votes

Is there a supported and well documented way to get debug symbols (and, preferably sources) automatically loaded in Visual Studio for a NuGet package build by CI in Azure DevOps?

I have read a great blog before, it gives a detailed steps how to debugging ASP.NET Core Nuget Packages with AzureDevOps/VSTS Symbol Server, you can check if it helps you:

Ticket: ASP.NET Core Debugging Nuget Packages with AzureDevOps | VSTS Symbol Server

If what I am trying to do is the correct way, how do I deal with .symbols.nupkg?

I am afraid not, we need use the task Index Sources & Publish Symbols to index your source code and optionally publish symbols to the Package Management symbol server or a file share.

Hope this helps.

0
votes

The docs @zivkan linked are the place to start. The Azure DevOps symbol server doesn't currently support .snupkgs.