0

If this is not the correct place for this question, could you please point me elsewhere? (MS forums are not typically helpful, kind-of suck)

I am working with trying an Azure Devops 2022 RC [on-prem] to see what problems may occur when we upgrade.

With a new pipeline for a test solution targeting Any CPU and.NET 7.0 I am getting this error.

##[error]The nuget command failed with exit code(1) and error(NU1201: Project X.Common is not compatible with net70-windows (.NETFramework,Version=v7.0,Profile=windows). Project X.Common supports: net70 (.NETFramework,Version=v7.0)

This is 100% a .NET 7 solution, and all of the Nugets are up-to-date.

The Build Agent has the latest .NET 7.0 SDK

x.Common.csproj

x.Common.Abstractions.csproj

Doug B.
  • 11
  • 2

1 Answers1

0

I had the same issue this morning. The root cause was an updated NuGetCommand with an older version of NuGet itself.

The solution is manually installing the Nuget package using the Nuget tool installer task

- task: NuGetToolInstaller@1
  inputs:
    versionSpec: 5.x

A detailed description can be found here

Thomas Ley
  • 76
  • 4