I am currently trying to enable a nuget library to debug locally in a CI/CD process.
The current situation
I have a build configuration on Azure Devops which is using an Ubuntu agent. The build publishes artifacts and the release pipeline packs/pushes the nuget package to Azure Artifacts.
First I tried by using the snupkg format to publish the pdb files but those are not supporting within Azure Artifacts. https://developercommunity.visualstudio.com/t/add-snupkg-support-to-azure-devops-artifacts/657354
I tried to follow this tutorial. https://docs.microsoft.com/en-us/azure/devops/artifacts/symbols/setting-up-github-sourcelinking?view=azure-devops
First obstacle is that the task to publish a symbol publish does not work on Linux but solely on Windows. https://github.com/microsoft/azure-pipelines-tasks/issues/5919
Therefore I didn't have much luck using the symbol server. I found a workaround by adding the following in the .csproj
file
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
Now the symbols are packed within the nuget file but still not loaded automatically when I am using the package in visual studio. (I unchecked Enable just my code in VS)
When I am adding them manually in the Modules windows in Visual Studio, it works.
Is there any way to build up the CI/CD process with Linux agents in Azure Devpos to get the Symbols working correctly? Alternatively can VS automatically load the symbols when it loads the nuget package?
My project is .net standard 2.1/.net framework 5. Builds: Azure Devops (Ubuntu agent) Nuget repository: Azure Artifacts Visual studio: VS 2019 16.8.4
All help us much appreciated.
Thanks