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 ?

2
  • If it's been documented correctly you should be able to use Get-Help EntityFramework -Full to show you everything you need to know. Commented Feb 2, 2017 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... Commented Feb 2, 2017 at 10:28

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I also found you can do: $project = 'Get-Project' and then print it by typing: '$project' in the NuGet package console in Visual Studio.
The answer here gives a lot more information about the $project and $packages arguments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.