Reputation: 6011
Quick question regarding the Package Manager Console and the “Update Package” command.
I currently have a single solution hosting two MVC 4.0 projects (one of them is Set as Startup Project).
When I open the Package Manager Console
, I choose the project I want to update from the Default project dropdown
and then, I launch the “Update-Package
” command.
To my surprise, the “Update-Package
” command does not take into account the project I have selected inside the Default project dropdown
but instead, it updates both my MVC 4.0 projects.
The workaround is to manually specify my project name inside the “Update-Package” command like so: Update-Package -ProjectName Kobo.Portal.Web
Out of curiosity, does anyone know why the Update-Package command does not take into account the selected/targeted project in the Default project dropdown?
Is this a known issue? Is this by design? What’s the purpose of having to choose a Default project if the Package Manager Console won’t take it into account?
Perhaps my understanding of the Package Manager Console is wrong :-(
Thanks in advance for anyone shedding some light on this.
Sincerely Vince
Upvotes: 20
Views: 14451
Reputation: 18946
to update all existing Nuget packages in 1 project inside your solution. note that in Package Manager Console autocomplete works for commands and project name and packages
Update-Package -ProjectName Project1 -Reinstall
Upvotes: 2
Reputation: 11908
To update a specific project you can specify
Update-Package -ProjectName <yourproject>
To get detailed help on the commands in the Package Management console you can type
get-help update-package -detailed
Upvotes: 23