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

NU1701 - Change the wording of this warning #5538

Closed
g0t4 opened this issue Jul 5, 2017 · 9 comments · Fixed by NuGet/NuGet.Client#1536
Closed

NU1701 - Change the wording of this warning #5538

g0t4 opened this issue Jul 5, 2017 · 9 comments · Fixed by NuGet/NuGet.Client#1536

Comments

@g0t4
Copy link

g0t4 commented Jul 5, 2017

In a netcoreapp2.0 project, if I add a package that targets net461, I get a new warning as of 2.0 preview2:

/api/api.csproj : warning NU1701: Package 'Faker.Net 1.0.3' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This may cause compatibility problems.

I had a hunch that this was just warning me about the new behavior in 2.0 to reference netfx packages. But I wasn't certain from the message alone. Upon looking up NU1701 here https://github.com/NuGet/Home/wiki/Restore-errors-and-warnings#nu1701 I found an explanation that I understood:

PackageTargetFallback was used to select assets from a package. This is a warning to let the user know that the assets may not be 100% compatible.

Two things helped me verify what the warning was really about: PackageTargetFallback was used to select assets and may not be 100% compatible

Could we use some of this explanation in the warning?

Perhaps:

/api/api.csproj : warning NU1701: Package 'Faker.Net 1.0.3' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This package may not be 100% compatible.

or

/api/api.csproj : warning NU1701: Package 'Faker.Net 1.0.3' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This package may not be 100% compatible because AssetTargetFallback was used to select assets from this package.

@emgarten
Copy link
Member

emgarten commented Jul 5, 2017

@anangaur would you take a look at the text of this message?

@anangaur
Copy link
Member

anangaur commented Jul 5, 2017

I like the first suggestion. I would avoid the use of PackageTargetFallback or AssetTargetFallback terms here as that's unnecessary confusion.

Proposed text:

/api/api.csproj : warning NU1701: Package 'Faker.Net 1.0.3' was restored using '.NETFramework,Version=v4.6.1' instead the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.

@g0t4
Copy link
Author

g0t4 commented Jul 5, 2017 via email

@anangaur
Copy link
Member

anangaur commented Jul 5, 2017

Sure. Go ahead. :)

@g0t4
Copy link
Author

g0t4 commented Jul 6, 2017

@emgarten
Copy link
Member

emgarten commented Jul 6, 2017

@g0t4 you don't need to worry about localization, that will be updated later.

g0t4 added a commit to g0t4/NuGet.Client that referenced this issue Jul 6, 2017
…project."

The previous message "This may cause compatibility problems" felt ominous. As if I had done something wrong.

The new message is designed to indicate that the package could be partially, or fully, compatible. Also it re-iterates that the package is the potential source of incompatibility. This to mean comes across as saying "this isn't necessarily a problem"

This resolves NuGet/Home#5538
@g0t4
Copy link
Author

g0t4 commented Jul 6, 2017

PR ready, do we need to do anything to make sure that the wiki and localization get updated? Create issues?

wiki: https://github.com/NuGet/Home/wiki/Restore-errors-and-warnings#nu1701

@rohit21agrawal
Copy link
Contributor

@g0t4 you don't have to worry about localization at all.

mishra14 pushed a commit to NuGet/NuGet.Client that referenced this issue Jul 7, 2017
…project."

The previous message "This may cause compatibility problems" felt ominous. As if I had done something wrong.

The new message is designed to indicate that the package could be partially, or fully, compatible. Also it re-iterates that the package is the potential source of incompatibility. This to mean comes across as saying "this isn't necessarily a problem"

This resolves NuGet/Home#5538
@anangaur
Copy link
Member

I made the changes to the wiki

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

Successfully merging a pull request may close this issue.

5 participants