How do I install a NuGet package into the second project in a solution?

前端 未结 7 964
名媛妹妹
名媛妹妹 2020-12-12 09:50

I\'m currently working on a solution that initially contained one project (My.First.Project.Name). I\'ve installed Castle Windsor by executing:

         


        
7条回答
  •  孤城傲影
    2020-12-12 10:18

    There's 3 approaches :).
    In NuGet 1.1 (The latest release) we've improved powershell pipelining so you can do this:

    Get-Project -All | Install-Package SomePackage
    

    That will install "SomePackage" into all of your projects. You can use wildcards to narrow down which projects:

    Get-Project Mvc* | Install-Package SomePackage
    

    That will use wildcard semantics (in this case, find all projects that start with mvc).

    Get-Project SomeProject | Install-Package SomePackage
    

    That will install SomePackage into SomeProject and nothing else.

提交回复
热议问题