Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

340
Visualizações
.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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda