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
Comments
In addition to gaining a command-line argument, nuget.exe should also respect the value from NuGet.config (currently it does not). |
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? |
@jacqueskang this is not supported in project.json. Our dependency resolution behavior is documented here https://docs.nuget.org/consume/projectjson-dependency |
@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? |
Adding @joelverhagen @emgarten . Do you guys have any ideas? |
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. |
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: |
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. |
Is there any movement on this? We also have a process that requires that nuget.exe install the latest version of matching dependencies. |
Thanks @billboyletrintech and @WardenGnaw for fixing this issue! 🥇 Merged with NuGet/NuGet.Client@6f8d529 |
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. |
@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. |
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.
The text was updated successfully, but these errors were encountered: