Could you tell me how to update all the 'ASP.NET Boilerplate Nuget Packages' at once ? Let's say on the latest release where it's having around 10 Nugets. So without updating them one by one where is there any method to update them all at once ? Thanks in advance.
7 Answer(s)
-
0
I don't know if Visual Studio supports this. I also do it by hand :( But nuget command line may support this. You can check it's docs.
-
0
Just use Visual Studio 2015 update 1. Nuget have update all functionality.
-
0
Visual Studio 2013 has too "update all".
-
0
to update all Abp* packages from nuget console :
ForEach($project in get-project -all) { ForEach($package in Get-Package -ProjectName $project.ProjectName | ?{ $_.Id -like 'Abp*'}) { Update-Package -ProjectName $project.ProjectName -Id $package.Id;} }
-
0
Thank you for this magical code :)
We had written this before:
get-project -all | get-package | ?{ $_.Id -like 'Abp*' } | update-package
(<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Nuget-Packages#tips">http://www.aspnetboilerplate.com/Pages/ ... kages#tips</a>)
What's the different from the code you have shared.
-
0
i didn't saw that it was already on the documentation :mrgreen: Well, that's not my creation, it's from another developer :oops:
it appears that : (source [https://coderwall.com/p/gvrn4w/update-all-nuget-packages-in-a-solution-matched-by-name]))
ForEach($project in get-project -all) { ForEach($package in Get-Package -ProjectName $project.ProjectName | ?{ $_.Id -like 'Abp*'}) { Update-Package -ProjectName $project.ProjectName -Id $package.Id;} }
is faster to execute than : (source [https://coderwall.com/p/wtobfg/update-all-nuget-packages-in-a-solution-matched-by-name--2]))
get-project -all | get-package | ?{ $_.Id -like 'Abp*' } | update-package
by avoiding unecessary check.
The complexity of the original one is too big as it tries to update all packages found for all projects, instead of just the packages present on each project.
the current one works fine, but i've already 28 projects in my solution, so it takes a lot of time ;)
-
0
So, you say that this is faster:
ForEach($project in get-project -all) { ForEach($package in Get-Package -ProjectName $project.ProjectName | ?{ $_.Id -like 'Abp*'}) { Update-Package -ProjectName $project.ProjectName -Id $package.Id;} }
Let us try it and update the documentation. Created an issue: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1379">https://github.com/aspnetboilerplate/as ... ssues/1379</a>