What do the $package and $project params contain in a NuGet install.ps1 script?

后端 未结 1 1708
萌比男神i
萌比男神i 2021-02-07 14:54

I\'m writing my first install PowerShell script for a NuGet package. I\'m trying to copy a file from the lib folder into the tools folder of another Nu

1条回答
  •  自闭症患者
    2021-02-07 15:20

    In NuGet 2:

    • $project => EnvDTE.Project - which is the Visual Studio object model for a project.
    • $package => NuGet.IPackage - the NuGet package.

    In NuGet 3:

    • $project => EnvDTE.Project
    • $package => ScriptPackage

    Note that the $package in NuGet 3 has a fewer properties available so some PowerShell scripts included with existing NuGet packages will not work.

    0 讨论(0)
提交回复
热议问题