Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the parameters passed to the 'install.ps1' script of a NuGet package?

I need to know what are those parameters: $installPath, $toolsPath, $package, $project

Example for EntityFramework NuGet package:

install.ps1

param($installPath, $toolsPath, $package, $project)

Initialize-EFConfiguration $project
Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'

Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework commands."

For what reason are they used for ?

Is there some way to debugging this script ?

like image 469
Thomas Avatar asked Feb 02 '17 10:02

Thomas


1 Answers

Your question is a little bit unclear. Are you asking about what the parameters are used for?

  • $installPath is the path to the folder where the package is installed. By default: $(solutionDir)\packages
  • $toolPath is the path to the \tools directory in the folder where the package is installed. By default: $(solutionDir)\packages\[packageId]-[version]\tools
  • $package is a reference to the package object
  • $project is a reference to the target EnvDTE project object. This object is defined here.

If your question is about debugging install.ps1 and get actual values for your parameters, see this answer.

like image 182
David Brabant Avatar answered Nov 05 '22 23:11

David Brabant