Azure devops 服务器 - 使用自定义条件构建 csproj(如果存在则忽略)以摆脱 "partial success"

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"

我正在使用 Azure DevOps Server 2019,我想 运行 一个“Visual Studio 构建”任务 只有 如果 csproj 存在,或者只是如果没有,继续前进。目前,我尝试构建文件并忍受任务失败和总体“部分成功”(如果它不存在)。如果可以的话,我更愿意使用“自定义条件”来改进它,而不是对其进行内联 powershelling。

你的要求无法通过"Custom condition"实现,你可以在"Visual Studio build"任务之前添加一个powershell任务来检查csproj是否存在并输出一个变量。然后在"Visual Studio build"任务的条件下使用这个变量。