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

IVSPackageInstaller/IVsPackageInstaller2 install dependency lowest version #6833

Open
BilgehanYildiz opened this issue Apr 16, 2018 · 6 comments
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. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time
Milestone

Comments

@BilgehanYildiz
Copy link

when I want to install with dependencies it is not install latest version of dependency.It is installing lowest version of dependency.

IVsPackageInstaller2.InstallLatestPackage or IVsPackageInstaller
Scenario
Package A Latest Version 1.0.5 and has dependency to Package B
Package B Latest Version 1.0.9 and lowest version is 1.0.0
when I install PackageA it is installed 1.0.5 and find its dependecy package B and install lowest version 1.0.0
How can I force to install dependency latest version too.
Regards

@nkolev92
Copy link
Member

nkolev92 commented Apr 16, 2018

@BilgehanYildiz
NuGet resolves the dependencies to the lowest by design.
I would assume you're using packages.config based projects?
In that scenario currently only the user itself can specify the dependency resolution strategy.

If you're concerned with getting the latest package, I'd suggest installing that explicitly, and passing ignore dependencies as false.

Here's our resolution strategy for PackageReference projects.
There is no way to force highest dependency resolution in the PackageReference case.
Related issue#5553 for a different resolution behavior.

Does this answer your questions/unblock you?

@nkolev92 nkolev92 added the WaitingForCustomer Applied when a NuGet triage person needs more info from the OP label Apr 16, 2018
@BilgehanYildiz
Copy link
Author

This cause performance issue from me each time I check package dependency find its latest version and install it?What you suggest?

@nkolev92
Copy link
Member

nkolev92 commented Apr 16, 2018

If you know the dependency tree, you don't need to specify the version. Then NuGet's caching mechanism would make it a little more performant, but still lower than letting NuGet do it's own thing.

Can you tell us more about your scenario?

Why is it important for you that the transitive dependencies are latest?

Do you own all packages to be installed? Or do you only own the direct dependency?
Having Package X install with different transitive dependencies depending on the time of the installation, increases the test matrix and could lead to more problems.

Is your scenario public?

Please note that historically we haven't been adding IVS NuGet APIs very lbierally, we'd need a good amount of customers to ask for us to consider an enhancement.
//cc @rrelyea

@BilgehanYildiz
Copy link
Author

Hi I dont know dependency tree.But if nuget has api for that I can find.Actually myrequest is simple I want to use installatestmethod with latest dependency if you add this feature it is functional.I own all packages.A sample scenario I have a OracleDataAccess dependecy with my package and OracleDataAccess dependecy is latest version.When I use installlatest that time it decrease my oracledataaccess version and it cause problem

@nkolev92
Copy link
Member

If you own all packages, you already know the dependency tree then.
It's the package you own, and all the packages that the package you own depend on.

Do you really need to be using IVs APIs if you're not shipping an external feature?

@BilgehanYildiz
Copy link
Author

BilgehanYildiz commented Apr 17, 2018

I already write my code,but if you add this feature to vsinstaller it is helpful.A parameter like ignoredependcy.something like that DependecyLevel lowest or highest thanks

@nkolev92 nkolev92 added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed WaitingForCustomer Applied when a NuGet triage person needs more info from the OP labels Apr 17, 2018
@nkolev92 nkolev92 added this to the Backlog milestone Apr 17, 2018
@nkolev92 nkolev92 added Functionality:SDK The NuGet client packages published to nuget.org and removed NuGet API labels Apr 24, 2020
@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
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. Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time
Projects
None yet
Development

No branches or pull requests

4 participants