NuGet for solutions with multiple projects

前端 未结 6 1038
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 04:39

Suppose I have a solution with 3 projects:

  • Core
  • UI
  • Tests

Some of the NuGet packages I use will apply to all 3 projects. Some w

6条回答
  •  攒了一身酷
    2020-12-02 05:21

    In Package Manager Console you can write the following command:

    Get-Project -all | ForEach-Object {Get-Package -ProjectName $_.Name -filter 
    PACKAGE_NAME} | where-object { $_.id -eq 'PACKAGE_NAME' } | Install-Package 
    PACKAGE_NAME -Version VERSION
    

    You can use that command for install or update as well (Update-Package)

提交回复
热议问题