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

Feature: Add dependencyVersion switch to command-line #1806

Closed
csharpfritz opened this issue Dec 2, 2015 · 12 comments
Closed

Feature: Add dependencyVersion switch to command-line #1806

csharpfritz opened this issue Dec 2, 2015 · 12 comments
Assignees
Labels
help wanted Considered good issues for community contributions. Priority:2 Issues for the current backlog. Type:Feature
Milestone

Comments

@csharpfritz
Copy link
Contributor

The dependencyVersion switch is available in NuGet.config, the Visual Studio UI, and Powershell experiences but is not available on the command-line for the install, update, or restore commands.

@yishaigalatzer yishaigalatzer added this to the 3.5 Beta milestone Dec 2, 2015
@yishaigalatzer yishaigalatzer added Priority:2 Issues for the current backlog. Type:Feature help wanted Considered good issues for community contributions. labels Dec 2, 2015
@yishaigalatzer yishaigalatzer modified the milestones: 3.5 Beta, 3.5 RC Apr 8, 2016
@jberezanski
Copy link

In addition to gaining a command-line argument, nuget.exe should also respect the value from NuGet.config (currently it does not).

@jacqueskang
Copy link

We are surprised to find out nuget.exe v3.5.0-beta2 doesn't take into account "dependencyVersion" specified in nuget.config, when restoring NuGet packages from project.json. Does anyone know a walk-around for this ? How can I have nuget.exe install "highestMinor" version for indirect dependencies?

@harikmenon
Copy link

@jacqueskang this is not supported in project.json. Our dependency resolution behavior is documented here https://docs.nuget.org/consume/projectjson-dependency

@jacqueskang
Copy link

@harikmenon Thanks for your rely. But in our case we want to restore latest minor version of all packages in the entire dependency graph. The floating version works perfectly for direct dependencies but since nupkg doesn't support floating version, it restores minimum version for indirect dependencies. Our project is huge and we build it by parts, and thus we are getting conflicts in the end. Do you have any suggestion please?

@harikmenon
Copy link

Adding @joelverhagen @emgarten . Do you guys have any ideas?

@joelverhagen
Copy link
Member

Hey @jacqueskang, as @harikmenon said, this feature is not supported today on project.json.

I have created an issue to track this idea. Feel free to check this issue in the future for status: #3159.

This would definitely require a significant amount of careful design and implementation and is currently not scheduled for the next two NuGet releases.

@jacqueskang
Copy link

Thanks @joelverhagen for the clarification. I see manually lifting dependencies up to project.json is the only option for this time being. Allowing to have a similar behavior like npm would be nice in the future +1:

@billboyletrintech
Copy link

billboyletrintech commented Dec 1, 2016

This became an issue for us while trying to use nuget for the deploy step in a CI environment where we would want nuget cli to grab the highest version of all dependencies. I added the switch for the install command, hope thats ok.

@erick-thompson
Copy link

Is there any movement on this? We also have a process that requires that nuget.exe install the latest version of matching dependencies.

@emgarten emgarten self-assigned this Aug 10, 2017
@emgarten emgarten modified the milestones: 4.4, Future-1 Aug 10, 2017
@emgarten
Copy link
Member

Thanks @billboyletrintech and @WardenGnaw for fixing this issue! 🥇

Merged with NuGet/NuGet.Client@6f8d529

@Indomitable
Copy link

Hi, I see that this fix is only done for the Install command but in the Update command it is still hard coded to use Highest version.
#2746
I think we should reopen this issue.

@emgarten
Copy link
Member

emgarten commented Nov 20, 2017

@Indomitable open a new issue and PR if you would like. At this point the recommended way to run nuget operations from the command line is to move to PackageReference.

The only complete way to update packages for a packages.config project is through Visual Studio. nuget.exe update is very limited in what it can do. Install is a bit different in that it doesn't install to the project at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Considered good issues for community contributions. Priority:2 Issues for the current backlog. Type:Feature
Projects
None yet
Development

No branches or pull requests

10 participants