I created a new solution 2 weeks ago using .Net 5 RC2. I've upgraded it to the new release (5.0.0). I'm trying to created a standard ASP.Net pipeline to build it, agent pool is Azure Pipelines, and agent specification I've tried both windows-2019 and vs2017-win2016. Both give the same errors as below Why is it trying to use 2.1?
Checking compatibility for System.Composition.AttributedModel 1.0.31 with .NETFramework,Version=v5.0 (win7-x86).
Checking compatibility for System.Composition.Runtime 1.0.31 with .NETFramework,Version=v5.0 (win7-x86).
Checking compatibility for System.Composition.TypedParts 1.0.31 with .NETFramework,Version=v5.0 (win7-x86).
Incompatible packages: 4
Committing restore...
Generating MSBuild file D:\a\1\s\XXX\obj\XXX.csproj.nuget.g.props.
Generating MSBuild file D:\a\1\s\XXX\obj\XXX.csproj.nuget.g.targets.
Writing lock file to disk. Path: D:\a\1\s\XXX\obj\project.assets.json
Writing cache file to disk. Path: D:\a\1\s\XXX\obj\XXX.csproj.nuget.cache
Restore failed in 38.96 sec for D:\a\1\s\XXX\XXX.csproj.
NuGet Config files used:
D:\a\1\Nuget\tempNuGet_3.config
Feeds used:
https://api.nuget.org/v3/index.json
Installed:
71 package(s) to D:\a\1\s\XXX\XXX.csproj
##[error]The nuget command failed with exit code(1) and error(NU1202: Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Tools 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.Tools 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Design 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.Design 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Relational 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.Relational 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Tools 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.Tools 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Relational 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.Relational 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Design 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.Design 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
Errors in D:\a\1\s\XXX\XXX.csproj
NU1202: Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Tools 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.Tools 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Design 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.Design 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Relational 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0). Package Microsoft.EntityFrameworkCore.Relational 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.SqlServer 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Tools 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.Tools 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Relational 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.Relational 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1)
NU1202: Package Microsoft.EntityFrameworkCore.Design 5.0.0 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.Design 5.0.0 supports: netstandard2.1 (.NETStandard,Version=v2.1))
##[error]Packages failed to restore
Finishing: NuGet restore ```