Reputation: 1
I have a powershell script that references dll files and i would like to distribute this script to customers. How can i do this such that the customers don't have to worry installing/referencing correct dll files?
I reference the dll files from within the script in the following way:
Add-Type -Path <local path to dll>
I am looking for a way to either bundle these dll's along with the script , or some way for powershell to install the dll when it runs. The dll's i am interested in are available as following nuget packages:
Upvotes: 0
Views: 369
Reputation: 94
You could try copying the dll files to the directory the script is in and then use "$PSScriptRoot\Name.Of.File.dll". Zip the directory and distribute the Zip file.
Upvotes: 1