将 *.snupkg 符号包发布到 VSTS 中的私人订阅源 [英] Publish *.snupkg symbol package to private feed in VSTS
问题描述
我想使用 VSTS 构建将基于 .net 标准的代码打包并发布为 nuget 包.我创建了一个私有 nuget 提要(在 VSTS Artifacts 中),我想将 nuget 包与符号包一起发布到该提要.
我尝试使用 dotnet CLI 任务来构建和发布,但它只发布 .nupkg 而不是 *.snupkg 到 nuget 提要.
我搜索了很多,但我只找到了与发布到 nuget.org 相关的文章,而不是与私人订阅源相关的文章.
在 VSTS 中将 *.snupkg 符号包发布到私有源
您可以将 .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.
Publish *.snupkg symbol package to private feed in VSTS
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:
- When publishing packages, both the symbols package and the .nupkg will be easily published to NuGet.org, or to any NuGet server that opts into this experience.
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 中的私人订阅源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!