Azure DevOps .NET Core Publish fails when CSPROJ is configured for SourceLink
See original GitHub issueHi, I am trying to add sourcelink support to my .NET Standard C# project in Azure DevOps. I posted the issue to the VS developer community, but our Msft DevOps representative suggested I also post here. In short, if I add the following to the VCPROJ file the Azure DevOps .NET Core Publish step will fail:
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
The publish step fails becasue it is trying to add two nupkg packages using the same identifier:
2019-01-15T20:52:18.6116399Z [command]"C:\Program Files\dotnet\dotnet.exe" nuget push D:\a\1\a\InsaneGenius.Utilities.1.1.20190115.11.nupkg --source https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v3/index.json --api-key VSTS
2019-01-15T20:52:21.4033450Z info : Pushing InsaneGenius.Utilities.1.1.20190115.11.nupkg to 'https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v2/'...
2019-01-15T20:52:21.4068772Z info : PUT https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v2/
2019-01-15T20:52:22.3381309Z info : Accepted https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v2/ 932ms
2019-01-15T20:52:22.3408346Z info : Your package was pushed.
2019-01-15T20:52:22.3634837Z [command]"C:\Program Files\dotnet\dotnet.exe" nuget push D:\a\1\a\InsaneGenius.Utilities.1.1.20190115.11.symbols.nupkg --source https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v3/index.json --api-key VSTS
2019-01-15T20:52:22.9984864Z info : Pushing InsaneGenius.Utilities.1.1.20190115.11.symbols.nupkg to 'https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v2/'...
2019-01-15T20:52:23.5035958Z info : PUT https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v2/
2019-01-15T20:52:23.8088034Z info : Conflict https://pkgs.dev.azure.com/pieterv/_packaging/7865d2b7-317d-4b9d-8dbf-afde06073a5b/nuget/v2/ 299ms
2019-01-15T20:52:23.9430124Z error: Response status code does not indicate success: 409 (Conflict - The feed already contains 'InsaneGenius.Utilities 1.1.20190115.11'. (DevOps Activity ID: 53788075-2469-4437-A43E-5D2A254D2016)).
2019-01-15T20:52:26.4073627Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2019-01-15T20:52:26.4083210Z ##[error]Packages failed to publish
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top Results From Across the Web
.NET Core Publish fails when using SourceLink or snupkg ...
Azure Native ISV Services .NET Core Publish fails when using SourceLink or snupkg NuGet Symbol formats in CSPROJ fileClosed - Fixed
Read more >Azure Devops Build Pipeline SourceLink.Create ...
Hi I am getting the following error in my Azure Devops build pipeline on the '.NET Core Build' task.
Read more >Producing Packages with Source Link - .NET Blog
Learn how to add Source Link to your packages, to make your users more productive while debugging.
Read more >Azure DevOps SourceLink and Symbol Server with ...
I have a .NET Standard 2.0 TestSouceLink project with the following configuration in the .csproj :
Read more >Azure devops .netcore fails but builds fine in visual studio
-- I get following error when building in azure devops or publish from VS to an Azure app service. Visual Studio builds it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here is the Azure DevOps feature request: https://developercommunity.visualstudio.com/idea/657354/add-snupkg-support-to-azure-devops-artifacts.html
I’m little bit confused. Is this really a VCPROJ, or is it actually C# project (.csproj)? Looks like the latter. In that case I think the problem is that you are trying to publish .snupkg to nuget feed hosted on Azure DevOps.
.snupkg
packages are currently only supported by NuGet.org.