-
Notifications
You must be signed in to change notification settings - Fork 258
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
Update all packages to specific Version from Specific Source #1760
Comments
This just doesn't work, the project system is the thing that makes the changes to the project, nuget just calls into it. You will have to move to project.json based project, where at some point we will be able to support it.
|
You can probably achieve this today by writing a powershell script, starting by using the following cmdlet
Will enumerate all the packages from the source you specified that have updates and from there you can change them to the right version. @deepakaravindr might be able to help some more on this |
Adding on @yishaigalatzer said, you can use `Get-Package -Updates -Source yoursource' to get the list of the updates available from the specified source on the packages installed on your project. And, do more using pipelining in powershell For example, if you installed WindowsAzureStorage -Version 4.3.0 on a C# console net45 application, From this result, you can pick all the packages which has updates in the source specified and the exact version by using a call like the following. In the same example, if I wanted to list all the packages in my project which has updates from the specifed source of http://www.nuget.org/api/v2 and there is an update with version as 5.7.0 Even better, upon getting the filtered result, You can call Update-Package on the package ids from the specified source. In the same example I have used, if you wanted to update all the installed packages to version 5.7.0 from the specified source if available, you may do the following
Cropped snaphot of the results as follows Please let me know if you need more information |
hey guys thanks for the updates. I just got VS2015 Update 1 and now the UI -Trent On Tue, Nov 24, 2015 at 6:50 PM, Deepak Aravindakshan <
|
any update about the command line and supporting the -Version Tag. |
This is targeted at vNext which means it was triaged to be lower priority than about 200 other items we are trying to accomplish for 3.4 and the version immediately after that. Like with anything else, we can take PR if you want to accelerate it |
I would like to attempt to PR this change but it will require a change to the Nuget.PackageManagement.NuGetPackageManager class and I cannot find the source for this anywhere but in the NugetArchive repos. Can someone point me in the right direction? |
Nuget.client repo |
Pull requests created for code and documentation: The change only supports specifying a version if a single package id has been provided. This will be able to support the original feature request (update everything to specific version) through powershell piping. I don't believe an "Update everything to version X.Y.Z" command would be helpful if that version exists for multiple unrelated packages, so a single command that affects multiples via pipes should suffice. |
Need to be able to do the following from SOMEWHERE in the UI or other.
Package-Manager-Console
update-package -Version x.x.x.x -Source my-package-source -ProjectName Some.sln
This makes me have to put an Id in currently (single package). I want to update all packages from this source to this version - where installed. Would like to do this with solution closed to speed the process. Not Sure if .sln is valid for projectname.
Nuget.CommandLine
nuget update Some.sln -Source my-package-source -Version x.x.x.x
Currently doesn't support -Version. Updates all packages from given source but always is latest... also could change the number during the process if the feed is updated mid-process resulting in mis-matched version numbers.
Nuget Package Packages UI
Change a Source to desired Source. Filter to 'Installed'. Query to a version and hit an Update All button.
The text was updated successfully, but these errors were encountered: