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

[Bug]: NuGet.Indexing NuGet package should be compatible with net6.0 #11388

Open
KirillOsenkov opened this issue Nov 16, 2021 · 5 comments
Open
Labels
Functionality:SDK The NuGet client packages published to nuget.org Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Bug

Comments

@KirillOsenkov
Copy link

NuGet Product Used

dotnet.exe, MSBuild.exe, NuGet.exe

Product Version

https://www.nuget.org/packages/NuGet.Indexing/6.0.0

Worked before?

No response

Impact

It's more difficult to complete my work

Repro Steps & Context

This NuGet package doesn't properly work when targeting net6.0.
https://www.nuget.org/packages/NuGet.Indexing/6.0.0

We get this warning:

Package 'NuGet.Indexing 6.0.0-rc.262' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net6.0-macos12.0'. This package may not be fully compatible with your project.

and the dependency on Lucene.Net is ignored, Lucene.Net.dll is not copied to output. This is because the dependencies are only declared for net472:
image

Verbose Logs

No response

@dominoFire dominoFire added Functionality:SDK The NuGet client packages published to nuget.org Priority:2 Issues for the current backlog. Pipeline:Backlog Triage:Investigate and removed Triage:Untriaged labels Nov 18, 2021
@KirillOsenkov
Copy link
Author

@sandyarmstrong brings up a valid point that this may be a more general problem than just a single package that wasn't authored for net6.

If we reference Lucene.Net 3.0.3 directly from the project, it works fine, but it is silently dropped as an indirect dependency. This behavior seems suspicious (a bug?)

@nkolev92

@sandyarmstrong
Copy link

Right. Basically, if I have a net6.0 app, and I reference a net472 package, nuget is giving me a reference to its net472 assembly. So why not continue down the net472 dependency chain?

Certainly a warning would be appropriate but it seems like when trying to reference a package from another target framework, you should get everything or nothing.

@nkolev92
Copy link
Member

nkolev92 commented Nov 18, 2021

Yeah, the bug is #5957.

It's a long standing bug that I've been wanting to fix for a while.
Really hoping to get to it soon.

Setting expectations, NuGet.Indexing adding explicit support for net6.0 is probably not something that is likely to be high on our priority list.

@KirillOsenkov
Copy link
Author

Yeah, we've worked around this particular issue by explicitly referencing Lucene.Net, so we're not blocked, but we're hitting this scenario all over the place for other packages, so please focus on fixing #5957. Glad it's known! Thanks!

@nkolev92 nkolev92 added Pipeline:Icebox Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Triage:Investigate Priority:2 Issues for the current backlog. Pipeline:Backlog labels Nov 22, 2021
@nkolev92
Copy link
Member

Made good progress in the linked issue: #5957 (comment).

I got to work on this in the context of our Customer Sprint, in which we get to spend time on specific high voted bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:SDK The NuGet client packages published to nuget.org Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Bug
Projects
None yet
Development

No branches or pull requests

5 participants