samsmithnz/AzurePipelinesToGitHubActionsConverter

consumers of the nuget unable to debug

Closed this issue · 9 comments

So I was upgrading yamlizr to consume the newest version of your package but I ran into some issues. Basically errors are being thrown inside your library however I am unable to debug them (easily) because your CI doesn't publish a NuGet package with the debugging symbols available via SourceLink. See red crosses below...

image

Whereas the result should look like;

image

Note: the last red tick will turn green when the built nuget originates on github/azdo.

PR incoming...

Note: there is a (very new) one-stop nuget package which handles a lot of the nuget symbols/debug stuff, however I believe this PR is a good first step to learn the whys & hows and you can refactor later to use https://github.com/dotnet/reproducible-builds

@samsmithnz re-pushed the branch with fixes;

  • no dotnet restore step
  • package path globbing correct

@f2calv: I had to restore the nuget step, a bunch of stuff was broken, and I don't have time to debug today. Looks like it's working now. I think it's good to have a separate step anyway - to ensure both the windows and linux build work - before pushing to nuget.

So it's not working right, v0.18.2 now looks correct as far as nuget package explorer is concerned;
image

However when I debug I am unable to load the symbols and step into the code;
image

The latest build artifact contains the right files;
image

But the nuget page doesn't show the snupkg available for download;
image

Which is understandable as the NuGetPush job doesn't push the snupkg packages;
image

Like it should in my workflow;
image

What is different here?

My push command line;
dotnet nuget push ${{ github.workspace }}/src/**/*.nupkg --skip-duplicate -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json

Your push command line;
dotnet nuget push nugetPackage\*.nupkg --api-key "${{ secrets.GHPackagesToken }}" --source "https://www.nuget.org/"

...fundamentally both lines are identical.

Ok cool.

I think it can only be that the your source endpoint is not specifying a version, according to https://devblogs.microsoft.com/nuget/improved-package-debugging-experience-with-the-nuget-org-symbol-server/ it should be the one I am using - which specifies https://api.nuget.org/v3/index.json

Note: what I also don't get, is that source link itself should just allow debugging (grabbing the code from the remote git repo) and not even need the symbol file to be pushed or at least that was my understanding.

And yep, understood :)

Reopening until issue is confirmed

@f2calv I received an extra email about the symbols publishing this time - I didn't get this in the last release. Perhaps it's good now?

image

Yep 0.18.3 now has symbols :)

image