You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building using MSBuild.exe : "C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" ConsoleApp2.csproj /t:restore /v:m generate NU1701 warning
warning NU1701: Package 'Microsoft.Build 17.1.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project
Ask us questions
This issue was originally opened on NuGet/Home#11771 but as it turns out NuGet by design fallback on .NET Framework if no dependency group matches TFM (i.e. .NET Core 3.1 in my case).
Is there a way we could work around this properly (no warn disabling)?
The text was updated successfully, but these errors were encountered:
Are you saying you want an error instead of the warning?
No. Is there a way to workaround this other than upgrading to .NET 6 or mute the warning ? I would have imagined the packages Microsoft.Build.* list all compatible TFM in their nuspec
Product Version
MSBuild
17.2.1.25201
Worked before?
Yes with MSBuild
16.11.2.50704
Repro Steps & Context
Sample reproduction project:
Building using
MSBuild.exe
:"C:\Program Files\Microsoft Visual Studio\2022\Professional\Msbuild\Current\Bin\MSBuild.exe" ConsoleApp2.csproj /t:restore /v:m
generate NU1701 warningAsk us questions
This issue was originally opened on NuGet/Home#11771 but as it turns out NuGet by design fallback on .NET Framework if no dependency group matches TFM (i.e. .NET Core 3.1 in my case).
Is there a way we could work around this properly (no warn disabling)?
The text was updated successfully, but these errors were encountered: