Many Packages. Test. Is this possible?

Jun 1, 2011 at 10:56 PM


I am installing a few packages in a project using the console. For example:

PM > Install-Package T4MVC

PM> Install-Package MvcDiagnostics

PM > ...

1 - Is it possible to install all packages in one code line?

2 - Or even better:

     Is it possible to have a test method that installs all packages and checks for updates?

Thank You,


Jun 2, 2011 at 1:16 AM

You could pipe an array of packages to the Install-Package cmdlet. It's about the same amount of effort though.

@('T4MVC', 'MvcDiagnostics') | Install-Package

If its a fresh install, you should get the latest set version of each package. NuGet 1.4 adds features to the Update-Package command to update all packages across projects.