Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

337
Views
.NET 6 does not support .NET Standard 2.1?

I just updated a project from .NET 5 to .NET 6. It compiles and runs perfectly locally. When I push this to azure, running my CI pipeline, an error is reporting that:

NU1202: Package MyStandardPackaged 1.0 is not compatible with net60 (.NETFramework,Version=v6.0). Package MyStandardPackaged 1.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)

Is there a workaround this, or I have to update this package declaring .NET 6?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you look very carefully at the error message you posted:

NU1202: Package MyStandardPackaged 1.0 is not compatible with net60 (.NETFramework,Version=v6.0). Package MyStandardPackaged 1.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)

Notice that it says that net6.0 is .NETFramework,Version=v6.0. However, .NET 6 is actually .NETCoreApp,Version=v6.0.

Therefore, I conclude you are using some old version of NuGet, that doesn't even know about .NET 5, to restore your project/solution.

My recommendation is to avoid the NuGetCommand task in Azure DevOps. Off the top of my head I can't think of any reason to use it, all the important features needed for a CI script exists in the dotnet CLI and MSBuild.exe.

Therefore, if all the projects in your solution/repo are SDK style (contain Sdk="whatever" in the project file), then use dotnet restore. If you have even a single non-SDK style project (every .cs in the directory is listed in the XML) then use msbuild -t:restore. This way, you'll never have a problem of mismatched NuGet versions again.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!