Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve NU1701 LFMerge build warnings #303

Open
megahirt opened this issue Aug 31, 2022 · 2 comments
Open

Resolve NU1701 LFMerge build warnings #303

megahirt opened this issue Aug 31, 2022 · 2 comments
Assignees

Comments

@megahirt
Copy link
Contributor

megahirt commented Aug 31, 2022

Warning 2: NU1701

The other warning that shows up a lot, which we might want to suppress, is warning NU1701, which says "Package 'foo' was restored using '(list of .NET Framework targets such as 4.6.1, 4.6.2, 4.7.1, etc.)' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project." In fact, all the .NET Framework packages we're inheriting are fully compatible with the net6.0 target, because none of them use APIs that are missing from the .NET 6 release. NuGet can't know that, so it prints a warning, but we'll probably want to suppress that warning.

To suppress this one for an individual package, we'd do something like this:

 <PackageReference Include="L10NSharp" Version="5.0.0-beta0094">
     <NoWarn>NU1701</NoWarn>
 </PackageReference>

Or to suppress it for all packages, we could do this:

<PropertyGroup>
    <NoWarn>$(NoWarn);NU1701</NoWarn>
</PropertyGroup>

This issue was original reported over at #285 and I split that issue into two (#285 and #303)

@josephmyers
Copy link
Collaborator

Having been a grizzled, old resident of UpgradeLand for the past year, I would hesitate to suppress NU1701. As long as you know the risks doing so, it's fine, but technically one of our now or future dependencies could make an unsupported call. Suppressing this would of course mean we discover it at runtime instead of compile time. Ideally we don't have these warnings in the first place

^ This was a comment on the original issue

@josephmyers
Copy link
Collaborator

Recommended as part of this is to create a shared document that tracks the status of these remaining .NET Framework dependencies. Make sure the proper parties can view progress on resolving these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants