Displaying per Project Result for List-Package

Coordinator
Dec 22, 2010 at 6:57 PM

List-Package by default displays packages installed in the solution. There are two bugs logged against this behavior:

  1. http://nuget.codeplex.com/workitem/245 "List-Package" does not return packages installed on the currently selected project
  2. http://nuget.codeplex.com/workitem/130 List-Package should show in which projects the packages are installed

Each of these bugs proposes a different solution to the same project. 

It was mentioned in 130 that adding a Project column to the output would be problematic. Is that the case?

If so, I think we could go with adding the -Project flag to the command for listing packages installed in a specific project.

Thoughts?

Phil

Dec 22, 2010 at 9:32 PM

I think you mean Get-Package ;)

If feels a bit strange to require a -Project flag to see the per-project packages when we already have a Default Project drop down.  Instead, the command should work like Install/Uninstall, and honor the drop down, while allowing it to be overridden by the -Project flag.  So by default, if you just type 'Get-Package', you only get the ones installed in the current project.

That leaves the issue of solution level packages, and maybe the way to handle than is via a -solution flag which would list all packages that exist at solution level.

Dec 23, 2010 at 12:32 AM

I like David's proposal, which is more intuitive and in line with Install/Uninstall-Package