我的Azure管道在Azure DevOps中的多个软件包上失败了
如“我的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.0task: UseDotNet@2 displayName: 'Use .NET Core sdk 5.0.x' inputs:
version: 5.0.x
includePreviewVersions: truetask: NuGetCommand@2 inputs:
restoreSolution: '$(solution)'
am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以解决此问题,请尝试使用最新的Nuget版本:
如果仍然存在此问题,请尝试禁用Nuget Restore任务并添加“ Dotnet Restore”任务。
To resolve this issue, please try to use the latest nuget version:
If still have this issue, try to disable nuget restore task and add the 'dotnet restore' task.