snupkg符号包发布到VSTS中的私有提要

snupkg符号包发布到VSTS中的私有提要

本文介绍了将* .snupkg符号包发布到VSTS中的私有提要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用VSTS构建程序将基于.net标准的代码打包并发布为nuget程序包.我创建了一个私有的nuget提要(在VSTS Artifacts中),我希望将nuget包和符号包一起发布到该提要.

我尝试使用dotnet CLI任务进行构建和发布,但它仅将.nupkg而不是* .snupkg发布到nuget提要.

我在Google上搜索了很多,但只找到了与发布到nuget.org而不是私人供稿有关的文章.

解决方案

您可以将.snupkg符号包发布到 NuGet.org或任何选择加入此体验的NuGet服务器.但是azure devops私人供稿没有这种经验.

您可以从此Wiki

但是Visual Studio只能直接解析符号文件( .pdb ),而不能解析 .snupkg 包,因此我们需要一个NuGet服务器来帮助我们读取< .snupkg 包中的code> .pdb 文件.Azure devops feed更倾向于成为程序包的共享存储库.

因此,我们必须将* .snupkg符号包发布到 NuGet.org或任何选择加入此体验的NuGet服务器.

如果您不想在nuget.org上共享软件包,则可以托管您自己的NuGet服务器,也可以使用以解决此问题(您可以使用专用供稿调试nuget包).

希望这会有所帮助.

I want to package and publish a .net standard based code as a nuget package using VSTS build. I have created a private nuget feed (in VSTS Artifacts) to which I would like to publish nuget package along with symbols package.

I tried using dotnet CLI tasks to build and publish but it only publish .nupkg and not *.snupkg to the nuget feed.

I googled alot but I only found articles related to publishing to nuget.org and not to a private feed.

解决方案

You can publish the .snupkg symbol package to NuGet.org, or to any NuGet server that opts into this experience. But azure devops private feed does not have this experience.

You can get the detailed info from this wiki NuGet Package Debugging & Symbols Improvements:

Reason:

As we know, when we consume .snupkg in Visual Studio, we add a new symbol server location under Symbol file (.pdb) locations:

But Visual Studio can only parse the symbol file (.pdb) directly rather than the .snupkg package, so we need a NuGet server to help us read the .pdb file from the .snupkg package. Azure devops feed is more inclined to be a shared repository of packages.

So, we have to publish *.snupkg symbol package to NuGet.org, or to any NuGet server that opts into this experience.

If you do not want share your package on the nuget.org, You can host your own NuGet server or you can use a lightweight solution to resolve this issue (You can debug the nuget package with private feed).

Hope this helps.

这篇关于将* .snupkg符号包发布到VSTS中的私有提要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 02:08