MSBuild.Sdk.SqlProj: Unknown target framework moniker
netcoreapp5.0 should be net5.0
The test project targets net5.0. In Visual Studio that leads to the error message:
Project ‘…..\src\DacpacTool\DacpacTool.csproj’ targets ‘netcoreapp2.1;netcoreapp3.1;netcoreapp5.0’. It cannot be referenced by a project that targets ‘.NETFramework,Version=v5.0’.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (18 by maintainers)
I can get the
MSBuild.Sdk.SqlProjitself to build nicely for target frameworknet6.0. However, building one of the test projects while using the net6.0 SDK fails with the following message:The command leading to this exception:
Adding a
global.jsonto forceSDK 5.0.401resolves the issue, so I find it reasonable to assume that the problem is related to using the current net6.0 SDK.Any ideas on how to solve this?
I’m thinking that maybe we should do a 2.0 release in which we drop support for .NET Core 2.1 (since it is out of support) and add support for .NET 6 (since that is now Go Live) and include all of the other changes and include this change as well. For people that are still on .NET Core 2.1 they can stick with version 1.16 for now, but my guess is that most people use at least 3.1 so they can easily upgrade to 2.0.
@jeffrosenberg @ErikEJ What do you think?