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
NuGet product used : Package Manager Console
NuGet version: 5.4.0.6292
VS version: 16.4.4
OS version: Win10 v1903
Worked before? If so, with which NuGet version: nope
Detailed repro steps so we can see the same problem
Reference a .NET framework project using the new SDK format from a .NET Std 2.0 project, and you will see a warning like this:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1653,5): warning NU1702: ProjectReference 'C:\blah\blah.csproj' was resolved using '.NETFramework,Version=v4.7.2' instead of the project target framework '.NETStandard,Version=v2.0'. This project may not be fully compatible with your project.
There is no way to suppress this message, even with <NoWarn>$(NoWarn);NU1702;1702</NoWarn> in my project file (for Debug and Release builds).
NU1701 can be suppressed via the props dialog for the package, but the props dialog for the project has no 'No Warn' entry field.
Verbose Logs
not needed
Sample Project
This project has 2 .NET Framework projects in it - the warning shows for the new SDK formatted project, but not the other (old style format). Note that no project is multi-targeted.
This needs to be reopened. #8797 had two issues in it - NoWarn and WarningsAsErrors. #8797 was closed as a duplicate of an issue about WarningsAsErrors, but the NoWarn part is still unaddressed.
It gives the workaround of using <MSBuildWarningsAsMessages>NU1702</MSBuildWarningsAsMessages> instead of NoWarn to suppress the warning. This has appeared to have worked for me. From what I gather, #8093 was raised to address that NoWarn values are not read at all by the client which is why suppressing using NoWarn doesn't work. (At least how I've interpreted it).
Details about Problem
NuGet product used : Package Manager Console
NuGet version: 5.4.0.6292
VS version: 16.4.4
OS version: Win10 v1903
Worked before? If so, with which NuGet version: nope
Detailed repro steps so we can see the same problem
Reference a .NET framework project using the new SDK format from a .NET Std 2.0 project, and you will see a warning like this:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1653,5): warning NU1702: ProjectReference 'C:\blah\blah.csproj' was resolved using '.NETFramework,Version=v4.7.2' instead of the project target framework '.NETStandard,Version=v2.0'. This project may not be fully compatible with your project.
There is no way to suppress this message, even with
<NoWarn>$(NoWarn);NU1702;1702</NoWarn>
in my project file (for Debug and Release builds).NU1701 can be suppressed via the props dialog for the package, but the props dialog for the project has no 'No Warn' entry field.
Verbose Logs
not needed
Sample Project
This project has 2 .NET Framework projects in it - the warning shows for the new SDK formatted project, but not the other (old style format). Note that no project is multi-targeted.
DotNetFramework.zip
The text was updated successfully, but these errors were encountered: