带有符号的Azure DevOps NuGet Feed [英] Azure DevOps NuGet Feed with Symbols

查看:43
本文介绍了带有符号的Azure DevOps NuGet Feed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要进行调试,我需要将包括Symbols在内的NuGet软件包推送到我们的自托管Azure Devops服务器.

For debugging I need to push my NuGet packages including Symboles to our self-hosted Azure Devops Server.

因此,我在构建管道中将 dotnet pack 任务与标志-include-symbols -include-source 一起使用.作为输出,我得到两个文件 package.1.0.0.nupkg package.1.0.0.symbols.nupkg .

Therefore I use the dotnet pack task with the flags --include-symbols and --include-source in my build pipeline. As output I get two files package.1.0.0.nupkg and package.1.0.0.symbols.nupkg.

当我尝试在发布管道中推送 package.1.0.0.symbols.nupkg 软件包时,我得到了反馈:

When I try to push the package.1.0.0.symbols.nupkg package in my release pipeline, I get the feedback:

409(冲突-提要中已经包含"package.1.0.0&".(DevOps活动ID:766B8BC7-9AE6-4998-A246-47397236122F).

409 (Conflict - The feed already contains "package.1.0.0". (DevOps activity ID: 766B8BC7-9AE6-4998-A246-47397236122F)).

我发现将* .snupkg符号包发布到私有供稿在VSTS 中.反馈是 Azure DevOps服务器不支持 NuGet Symbols ,他们建议使用符号服务器.

I found Publish *.snupkg symbol package to private feed in VSTS on stack. The feedback is that the Azure DevOps Server do not support NuGet Symbols and they suggest to use a symbol server.

是否可以简单地将 package.1.0.0.symbols.nupkg 重命名为 package.1.0.0.nupkg 并将此程序包推送到提要中,? Visual Studio 是否能够在此类程序包的源代码内部打开调试器?

Is it a possible workaround to simply rename the package.1.0.0.symbols.nupkg to package.1.0.0.nupkg and push this package to the feed? Is Visual Studio with able to open the debugger inside the sources of these kind of package?

还有另一种方法可以提供 NuGet符号以便在 Azure DevOps服务器上进行调试吗?

Is there another way to provide NuGet Symbols for debugging on a Azure DevOps Server?

推荐答案

您的帖子中有多个问题,让我们尝试一个一个地解决它们.

There are multiple questions in your post, let us try to solve them one by one.

  1. 是否可以简单地重命名将package.1.0.0.symbols.nupkg打包到package.1.0.0.nupkg并将其推送打包到提要?

答案是否定的.错误 409(冲突-提要中已经包含"package.1.0.0&" ,这意味着您已经有一个软件包 package.1.0.0.nupkg 提要中带有 version 1.0.0 的package.1.0.0.symbols.nupkg .因此,您不能在该提要中推送具有相同版本的另一个包.提要中的包版本是唯一的.为了保护程序包不会因为相同版本而相互踩踏.

The answer is no. The error 409 (Conflict - The feed already contains "package.1.0.0" means that you already have one package package.1.0.0.nupkg or package.1.0.0.symbols.nupkg with version 1.0.0 in your feed. So you could not push another package with same version in that feed. Package version in the feed is unique. In order to protect the package from stepping on each other because of the same version of the package.

因此,要解决该错误,您需要更新软件包版本,例如 1.0.1 (从feed中删除软件包的旧版本将无法解决此错误).

So, to resolve that error, you need to update the package version, like 1.0.1 (Deleting the old version of the package from the feed will not solve this error).

  1. Visual Studio是否能够在以下来源的内部打开调试器这种包装?

简短的回答是.详细信息将在下一个问题中进行解释.

The short answer is yes. The details will be explained in the next question.

  1. 是否存在另一种提供NuGet符号以在Azure上进行调试的方法DevOps服务器?

答案是肯定的,我们需要配置Visual Studio以启用调试远程程序包.您可以在下面参考官方文档和详细的博客:

The answer is yes, we need to configure Visual Studio to enable debugging remote packages. You could refer below Official document and detailed blog:

ASP.NET Core Debugging Nuget Packages with AzureDevOps | VSTS Symbol Server

  1. 但是当我使用nuget install package时,只有package.dll是一部分从Azure DevOps Artifacts下载的内容中的一部分.为什么会这样?

这是安装软件包的预期行为.因为大多数时候安装和使用nuget软件包时,我们不需要调试软件包,所以安装软件包只会将所需的dll添加到项目中,而不会配置Symbols软件包.如果要调试该软件包,则必须像上面的链接一样配置Symbols软件包.

This is expected behavior for installing the package. Because most of the time when we install and use the nuget package, we do not need the debug package, so the installation package will only add the dll we need to the project and will not configure the Symbols package. If we want to debug the package, we have to configure the Symbols package like above links.

  1. 反馈是Azure DevOps服务器不支持NuGet符号,建议使用符号服务器.

您在问题中提到的反馈针对的是* .snupkg 符号包,而不是符号包.Azure DevOps Server应该支持发布NuGet Symbols程序包,而不是调试程序包,我们必须手动配置Visual Studio以使用Azure DevOps Server.

The feedback you mentioned in the question is for *.snupkg symbol package not the symbols package. Azure DevOps Server should support publish NuGet Symbols packages, not debug packages, we have to manually configure Visual studio to use the Azure DevOps Server.

顺便说一句,由于您的帖子中有很多问题,而且问题比较笼统,所以我的回答不是很明确.如果您对任何特定问题有任何疑问,欢迎您打开一个包含详细问题的新帖子.

这篇关于带有符号的Azure DevOps NuGet Feed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆