I am trying to automatically call powershell script when install my own nuget package.
My install.ps1 is as below
I want to call a function in functions.ps1 which is in tools\Functions.ps1
Functions.ps1
Function Write-HelloWorld($param1 , $param2)
{
Write-Output "$param1 and $param2"
}
Install.ps1
param($installPath, $toolsPath, $package, $project)
. .\Functions.ps1
Write-HelloWorld 1,2
I am getting error saying the install.ps1 not able to find the function Write-HelloWorld.
How to call the function Write-HelloWorld in functions.ps1 inside install.ps1?
Thanks