'"No files matched the search pattern" in tfs build

I want to build my project from TFS Azure(VSTS). I have made one project which is under Asp.Net Core.

I have made Build definition with Asp.Net Core Template and given the path for restore like **\*.csproj but I am not sure about this path or not?

I have tried many options like **\admis.csproj and some others, but I have faced the same error as the one on the following image:

enter image description here

I am using Asp.Net Core 2.1. Any ideas?



Solution 1:[1]

Just check your Workspace mappings in Get sources step, make sure you have mapped the source directory which included the solution or project file *.csproj:

enter image description here

Solution 2:[2]

Please check!

1) Server path should be: $/YourDevOpsProjectName/YourBranchName/TheRestPathUntil .csproj file

As I see on your screenshot, your path should be $/0424Test/NetCoreApp/NetCoreApp (I'm assuming that your .csproj file is there).

2) I had the same problem, because when I tried to Queue build for my project, in Source version I set 1 and the process of the queue tried to take 1 source code version, that of course not exists. enter image description here

If Source version's value is empty, it try to get the last version of your source code

3) Use **/*.csproj as "Path to project(s)" for every task in your Agent job.

enter image description here

Solution 3:[3]

Please check!

  1. Server path should be: $/YourDevOpsProjectName/YourBranchName/TheRestPathUntil .csproj file

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andy Li-MSFT
Solution 2
Solution 3 Javith