简体   繁体   中英

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
  • Test project for .NET Core 3.0

And I created Azure DevOps pipeline which builds and packs this library for DevOps private Nuget feed. The pipeline contains the following steps:

  1. Use NuGet >= 5.3.1 (added this hoping to solve the issue)
  2. Use.Net Core sdk 3.0.100 (added this hoping to solve the issue)
  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). Project [Test Project] supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0)

So how can I set up CI/CD for.Net Core 3.0?

I DO NOT use YAML - I hate that thing.

I tried "Use Nuget" to force the pipeline to use the latest Nuget. I also tried to for it using the latest.Net Core 3.1.x. All this doesn't help.

What helped was the re-creation of the test project. Now the pipeline works!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM