I'm working on a .NET Core CLI app that needs to reference a 3rd party NuGet package that has not been published with a netcoreappX.X
target. I've run the Analyze Project Portability tool on it and got 100% compatibility, which is expected, as this is a relatively simple library.
The problem then comes in the form of this annoying NuGet warning:
Warning: NU1701
Package 'XXXXXX 1.0.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
Is there a way to hide this warning for a specific NuGet package?
I found an answer to my question in a Google Images search, which led me to this seemingly unrelated SO post:
In short, the Properties page of the NuGet package reference has a NoWarn attribute where the error code can be specified, as shown in the following image: