Right now I’m getting a warning that looks like
warning NU1701: Package 'Google.GData.Client 2.2.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.
It looks like you can suppress warnings for specific references if you’re using PackagesReferences: https://github.com/NuGet/Home/wiki/Improved-NuGet-warnings#problem
Looks something like
<PackageReference Include="Contoso.Base.API" Version="1.0.3">
<NoWarn>NU1701</NoWarn>
</PackageReference>```
Is this possible to do using Paket?
Paket already enables NoWarn
for a few warnings (<NoWarn>$(NoWarn);NU1603;NU1604;NU1605;NU1608</NoWarn>
in the latest version of Paket.Restore.targets
), but it could possibly also do this one. You can try it in your project by adding a NoWarn
block of your own, like <NoWarn>$(NoWarn);NU1701</NoWarn>
.
If that works I’d suggest opening a PR to Paket to see if they’d accept adding this one to the list.
Thanks for the tip.
The thing is, I want to only enable NoWarn for packages that get downloaded as a result of this dependency, but not globally. I happen to know this one is safe, but I think it could make debugging painful if it were ignored globally and by default.