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

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


In NuGet 2:

In NuGet 3:

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

You can always see which .NET Type a PowerShell variable is by using GetType().FullName, e.g.:

Write-Output $project.GetType().FullNameWrite-Output $package.GetType().FullName