I have setup a build definition in Visual Studio Team Services (was Visual Studio Online) builds.
Below is a snapshot of Powershell script setup:

I haven't set anything in 'Working folder' as I am assuming that it defaults to the folder where the script lives as specified in the info.
When build runs, it throws an exception at the Powershell step.
Below is the error snapshot:

Somehow the working folder is not the folder where the script is located. Any suggestions to fix it?
Use the powershell variable $PSScriptRoot to get the directory where your script is, and use that to figure out all other paths.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With