Reputation: 7430
I have a very simple script which spits out environment variables like this:
Write-Host "SYSTEM_TEAMPROJECT: $ENV:SYSTEM_TEAMPROJECT"
My build has one step, the PowerShell task. The task script filename is set to the path to the script in TFSVC e.g. $/Main/BuildProcessTemplates/AllProps.ps1.
When I queue a new build it fails reporting the following error: "The term 'C:\Builds\agent_work\cb535ea3\Main' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
Have I configured the task incorrectly?
-- UPDATE: Here's a copy of the powershell task
Upvotes: 4
Views: 2655
Reputation: 7430
Under the repository tab you need to include the script like below. If you have a directory of scripts you can select the folder instead.
Upvotes: 5