Pradeep
Pradeep

Reputation: 5510

VSTS release level "Windows PowerShell Cannot Run Script Whose Path Contains Spaces"

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

Upvotes: 3

Views: 464

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

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

Change argument to:

-webConfigFilePath "$(ConfigFilePath)"

Upvotes: 2

Related Questions