Dot source powershell scripts are not included when bundling
Dot sourced powershell scripts are not included when bundling is checked and the project is built.
My main project and a test with two scripts can make an exe, but dot sourced scripts are not bundled whether using bundling or packaage as exe.
Visual Studio - Version 15.9.2
PoshTools - Version 4.0.31
$PSVersionTable Name Value ---- ----- PSVersion 5.1.17134.407 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17134.407 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Comments (3)
-
-
reporter Hey, I was trying: . \Script1.ps1
I didn't realize that I wasn't specifying the path properly. As soon as I added another dot, it worked out.
Thanks for the quick reply
-
reporter - changed status to resolved
- Log in to comment
Can you please provide me with a snippet of how you are trying to dot source your scripts?
I just tried these examples and they worked: