.Net Core Seleniun Tests in Azure DevOps- No Files matched the search pattern error for .Net restore task

419 views Asked by At

Created a .Net core Selenium tests in Azure Repos. I have the .csproj as well in the Repos. Added a ASP.Net core task, in the restore task i have given Path to Project as "**/*.csproj".

Got the below error while running the build pipeline.

SYSTEMVSSCONNECTION exists true SYSTEMVSSCONNECTION exists true ##[error]No files matched the search pattern

Not sure if the Agent didnt find my .csproj file. Any help is deeply appreciated.

1

There are 1 answers

0
Jane Ma-MSFT On

I tried to reproduce your issue, but the task ran successfully.

My environment:

Agent: ubuntu-latest

.Net SDK Version: 3.1.403

My script:

- task: DotNetCoreCLI@2
  inputs:
    command: 'restore'
    projects: '**/*.csproj'
    feedsToUse: 'select'

You can do the following things to locate your issue:

  1. Rerun the pipeline using my environment configuration.
  2. Write the full and detailed path name. For example, $(System.defaultWorkingDirectory)/WindowsApp.csproj.
  3. Add a command line task to run dotnet restore directly.
  4. Set the system.debug variable to true. Rerun your pipeline and you will see a more detailed run log.