Skip to content

[Question]: How to make DotNetCoreCLI@2 fail if Project file(s) not found? #20852

Open
@realrubberduckdev

Description

@realrubberduckdev

Task name

DotNetCoreCLI

Task version

2

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows Server

Question

If we get the project pattern wrong when using the DotNetCoreCLI@2 task, the task just throws a warning message.

##[warning]Project file(s) matching the specified pattern were not found.
  • Is there a way to fail the task if no projects are found?
  • Or fail if no tests are found, as suggested in this StackOverflow post?
    The suggested BuildQualityChecks task checking for warning messages is not a good idea as other steps throwing warnings will cause it to fail, thereby adding more to maintenance work.
  • If no, is there a general pattern we should adopt to avoid misconfigured false positive feedback from pipelines?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions