I need to call out to a powershell function defined in a file in a separate folder. That function needs to use a dll located in the same folder. Is there any easy way to do this?
Details:
Structure:
- build\build.ps1
- tools\myTool\fileWithFunction.ps1
- tools\myTool\someDll.dll
build.ps1 has Include "...\tools\myTool\fileWithFunction.ps1"
It calls a function in that file. That function needs to load someDll.dll. I could pass the location of the folder (toos\myTool) in the function call, but was wondering if there's a way by which the function in fileWithFunction can figure out the location of the dll by itself (assuming that it's always in the same folder).