3
votes

I worked on DevOps with VSTS. Currently I used the “PowerShell” Task to run the PowerShell script. But unfortunately my VSTS repository name having space (for example “WebApp Demo”), that’s why I am getting the issue while executing the PowerShell script at VSTS release level.

[error] Process completed with exit code 0 and had 1 error(s) written to the error stream.

PowerShell Task configuration in VSTS release definition enter image description here

For resolving the above error I followed so many blogs but issue will be the same.

  1. Windows Powershell doesn't seem to accept target paths with spaces
  2. Run a PowerShell Script with Space in the Path
  3. Windows PowerShell Cannot Run Script Whose Path Contains Spaces
1
This is a long shot but did you try encapsulating the script path in double quotes? - Persistent13
It should work, add System.debug variable and set the value to true, then start release and share this log on the OneDrive. - starian chen-MSFT
@Persistent13, I already tried with double quotes, but it won't be work properly. - Pradeep

1 Answers

2
votes

Based on the log, you the value of ConfigFilePath is the path that contains space.

Change argument to:

-webConfigFilePath "$(ConfigFilePath)"