简体   繁体   English

Azure DevOps 管道在恢复时失败 - 测试项目与 netcoreapp2.2 不兼容项目支持:netcoreapp3.0

[英]Azure DevOps pipeline fails at Restore - Test project is not compatible with netcoreapp2.2 Project supports: netcoreapp3.0

I have a solution with 2 projects:我有两个项目的解决方案:

  • Client Library project made for .NET Standard 2.0为 .NET 标准 2.0 制作的客户端库项目
  • Test project for .NET Core 3.0 .NET Core 3.0 测试项目

And I created Azure DevOps pipeline which builds and packs this library for DevOps private Nuget feed.我创建了 Azure DevOps 管道,它为 DevOps 私有 Nuget 提要构建和打包这个库。 The pipeline contains the following steps:管道包含以下步骤:

  1. Use NuGet >= 5.3.1 (added this hoping to solve the issue)使用 NuGet >= 5.3.1(添加这个希望解决问题)
  2. Use.Net Core sdk 3.0.100 (added this hoping to solve the issue)使用.Net Core sdk 3.0.100(添加这个希望能解决问题)
  3. Restore packages恢复包
  4. Build...建造...

But the process fails at Restore packages step with:但该过程在恢复包步骤失败:

error NU1201: Project [Test Project] is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2).错误 NU1201:项目 [Test Project] 与 netcoreapp2.2 (.NETCoreApp,Version=v2.2) 不兼容。 Project [Test Project] supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0)项目【测试项目】支持:netcoreapp3.0 (.NETCoreApp,Version=v3.0)

So how can I set up CI/CD for.Net Core 3.0?那么如何为 .Net Core 3.0 设置 CI/CD?

I DO NOT use YAML - I hate that thing.我不使用 YAML - 我讨厌那个东西。

I tried "Use Nuget" to force the pipeline to use the latest Nuget.我尝试“使用 Nuget”来强制管道使用最新的 Nuget。 I also tried to for it using the latest.Net Core 3.1.x.我还尝试使用最新的.Net Core 3.1.x。 All this doesn't help.这一切都无济于事。

What helped was the re-creation of the test project.帮助的是重新创建测试项目。 Now the pipeline works!现在管道工作了!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Project xxx与netcoreapp2.2(.NETCoreApp,Version = v2.2)不兼容。 Project xxx支持:net48(.NETFramework,Version = v4.8) - Project xxx is not compatible with netcoreapp2.2 (.NETCoreApp,Version=v2.2). Project xxx supports: net48 (.NETFramework,Version=v4.8) 软件包与netcoreapp2.2不兼容 - Package is not compatible with netcoreapp2.2 TFM 从 netcoreapp3.0 升级到 netcoreapp3.1 时 Azure Function 构建失败 - Azure Function fails to build when TFM is upgraded from netcoreapp3.0 to netcoreapp3.1 VS2019 错误说项目在定位 netcoreapp2.2 时定位到“netcoreapp3.1” - VS2019 Error Says Project is Targetting 'netcoreapp3.1' when it is Targetting netcoreapp2.2 项目与netcoreapp2.0不兼容 - Project is not compatible with netcoreapp2.0 CsvHelper package:.netcoreapp3.0 不支持? - CsvHelper package: .netcoreapp3.0 not supported? 在TFS Build Agent上使用测试代理2017设置netcoreapp2.2测试 - Setup netcoreapp2.2 Test with Test Agent 2017 on a TFS Build Agent 使用 netcoreapp3.0 安装 dotnet-ef 时遇到问题 - Facing Issue while Installing dotnet-ef with netcoreapp3.0 约束引用“字符串”无法解析为类型。 (netcoreapp3.0) - The constraint reference 'string' could not be resolved to a type. (netcoreapp3.0) 在netcoreapp3.0控制台应用程序中,默认情况下会生成myprogram.exe(带扩展名exe)。 它是什么? - In netcoreapp3.0 console application, myprogram.exe (with extension exe) is generated by default. What is it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM