5

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 ?

Thomas
  • 1,289
  • 1
  • 17
  • 29
  • If it's been documented correctly you should be able to use `Get-Help EntityFramework -Full` to show you everything you need to know. – henrycarteruk Feb 02 '17 at 10:24
  • 2
    Just add `Write-Host "$installPath, $toolsPath, $package, $project"` to the install.ps1 script, install it and check the output - then you see all the actual parameters... – Martin Brandl Feb 02 '17 at 10:28

1 Answers1

8

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.

Community
  • 1
  • 1
David Brabant
  • 41,623
  • 16
  • 83
  • 111
  • I also found you can do: $project = 'Get-Project' and then print it by typing: '$project' in the NuGet package console in Visual Studio. – Thomas Feb 02 '17 at 10:51
  • The [answer here](https://stackoverflow.com/a/33811810/237091) gives a lot more information about the $project and $packages arguments. – Scott Stafford Nov 02 '17 at 14:58