我的Azure管道在Azure DevOps中的多个软件包上失败了

发布于 2025-02-13 05:09:15 字数 709 浏览 3 评论 0原文

如“我的Azure管道”标题中所示,以下日志失败

## [错误] nuget命令因出口代码(1)和错误(nu1202:package MediaTr.extensions.microsoft.dependentiondenction 10.0.1)而不是 与net50兼容(.netFramework,版本= V5.0)。包裹 MediaTr.extensions.microsoft.ipendentimentive 10.0.1支持: NetStandard2.1(.netStandard,版本= v2.1)

我可以发布更多,但是其他软件包(例如Automapper和EntityFrameworkcore)的消息相同。

我正在使用yaml文件中的以下步骤。

步骤:

  • 任务:NugettoolInstaller@0 DisplayName:'使用Nuget 5.1.0'输入: versionspec:5.1.0

  • 任务:underotnet@2 displayName:'use .net core sdk 5.0.x'输入: 版本:5.0.x includepreviewversions:true

  • 任务:nugetCommand@2输入: 还原:'$(解决方案)'

我缺少什么吗?

as seen in the title my azure pipeline fails with the following log

##[error]The nuget command failed with exit code(1) and error(NU1202: Package MediatR.Extensions.Microsoft.DependencyInjection 10.0.1 is not
compatible with net50 (.NETFramework,Version=v5.0). Package
MediatR.Extensions.Microsoft.DependencyInjection 10.0.1 supports:
netstandard2.1 (.NETStandard,Version=v2.1)

I can post more but the messages are the same for other packages such as Automapper and EntityFrameworkCore.

I'm using the following steps in my YAML file.

steps:

  • task: NuGetToolInstaller@0 displayName: 'Use NuGet 5.1.0' inputs:
    versionSpec: 5.1.0

  • task: UseDotNet@2 displayName: 'Use .NET Core sdk 5.0.x' inputs:
    version: 5.0.x
    includePreviewVersions: true

  • task: NuGetCommand@2 inputs:
    restoreSolution: '$(solution)'

am I missing something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不及他 2025-02-20 05:09:15

我的Azure管道在Azure DevOps中的几个软件包上失败了

以解决此问题,请尝试使用最新的Nuget版本:

- task: NuGetToolInstaller@1
  displayName: 'Use NuGet '
  inputs:
    checkLatest: true

如果仍然存在此问题,请尝试禁用Nuget Restore任务并添加“ Dotnet Restore”任务。

My azure pipeline fails with my NugetCommand on several packages in Azure Devops

To resolve this issue, please try to use the latest nuget version:

- task: NuGetToolInstaller@1
  displayName: 'Use NuGet '
  inputs:
    checkLatest: true

If still have this issue, try to disable nuget restore task and add the 'dotnet restore' task.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文