tfs - 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.
解决方案
“自定义条件”无法达到您的要求,您可以在“Visual Studio build”任务之前添加一个powershell任务,以检查csproj是否存在并输出变量。然后在“Visual Studio build”任务的条件下使用这个变量。
推荐阅读
- php - Is there a particular function to receive the response of a stored procedure with a pivot?
- javascript - Random boolean 70/30 inside function?
- autohotkey - pressing Q should be Q + MB RightClick
- windows - 将 psql 查询输出存储到变量中的批处理文件
- vim - Use AHK to detect the "Vim Mode" for GUI windows and configure conditional mappings of keys
- django - Render Django AuthenticationForm in Jinja2
- spring - IdentityServer4 API Resource & Spring Framework
- delphi - 如何覆盖私有属性设置器?
- azure - Third Party DLLs in Azure Web API
- environment-variables - 在鱼壳中,如何设置具有默认回退的变量?