timB33
timB33

Reputation: 1987

Azure devops server - use custom condition to build a csproj if it exists (or ignore if it doesn't) to get rid of "partial success"

I'm using Azure DevOps Server 2019 and I want to run a "Visual Studio build" task only if a csproj exists, or just move on if it doesn't. At the moment, I attempt to build the file and put up with the task failing and an overall "partial success" if it doesn't exist. I'd prefer to improve this with a "Custom condition" rather than inline powershelling it if I can.

Upvotes: 0

Views: 409

Answers (1)

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31075

Your requirement can not be achieved with a "Custom condition", you may add a powershell task before "Visual Studio build" task to check whether the csproj exists and output an variable. Then use this variable in the condition of "Visual Studio build" task.

Upvotes: 2

Related Questions