Multiple Projects in a Solution

Jan 10, 2011 at 6:48 AM


We have got a custom library and we want to manage it with NuGet.

I could successfully created a package and installed in a project.

But what about other projects in solution?

Install-Package command does not have any parameters to install package to all projects in solution?

How can i achive this?

Jan 10, 2011 at 6:59 AM
Edited Jan 10, 2011 at 7:06 AM

If you're using the console and have not specified the -Project parameter, we'll use the Project specified in the drop down (it's at the top of the console). There is no build in support for installing a package into all projects, but if you wanted to do it it's pretty easy. Say you wanted to install ninject into all projects:

Get-Project -All | %{ Install-Package Ninject-Project $_.Name }

We're working on making the commands more compositional so that  the above command could look like this:

Get-Project -All | Install-Package Ninject

Jan 10, 2011 at 7:03 AM

Thank you, 

it works for me.

I am following you ;)