title: Setup of azure-pipelines.yml "No web project was found in the repository" with ASP.NET Core
body: <p>I need help to setup my azure-pipelines.yml build file because I cannot find any good tutorial, sample or other kind of help anywhere. </p>
  
  <p>I follow this tutorial by Microsoft <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core?view=azure-devops" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core?view=azure-devops</a> but despite all information they give I still get errors. </p>
  
  <p><strong>azure-pipelines.yml</strong> </p>
  
  <pre><code># ASP.NET Core
  # Build and test ASP.NET Core projects targeting .NET Core.
  # Add steps that run tests, create a NuGet package, deploy, and more:
  # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
  
  trigger:
  - master
  
  pool:
    vmImage: 'Ubuntu-16.04'
  
  variables:
    buildConfiguration: 'Release'
  
  steps:
  # - script: dotnet build --configuration $(buildConfiguration)
  #   displayName: 'dotnet build $(buildConfiguration)'
  
  - task: DotNetCoreInstaller@0
    inputs:
      version: '2.2.202' # replace this value with the version that you need for your project
  
  - script: dotnet restore
  
  - task: DotNetCoreCLI@2
    displayName: Build
    inputs:
      command: build
      projects: '**/*.csproj'
      arguments: '--configuration Release' # Update this to match your need
  
  # do this after you've built your app, near the end of your pipeline in most cases
  # for example, you do this before you deploy to an Azure web app on Windows
  - task: DotNetCoreCLI@2
    inputs:
      command: publish
      publishWebProjects: True
      arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
      zipAfterPublish: True
  
  - task: PublishBuildArtifacts@1
    inputs:
      ArtifactName: 'drop'
  </code></pre>
  
  <p><strong>Log</strong></p>
  
  <p><a href="https://i.stack.imgur.com/OQoUd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OQoUd.png" alt="enter image description here"></a></p>
  
  <pre><code>##[section]Starting: DotNetCoreCLI
  ==============================================================================
  Task         : .NET Core
  Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet.
  Version      : 2.150.1
  Author       : Microsoft Corporation
  Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
  ==============================================================================
  ##[error]No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory.
  ##[error]Project file(s) matching the specified pattern were not found.
  ##[section]Finishing: DotNetCoreCLI
  </code></pre>
  
  <p>Why these error and what am I doing wrong? </p>
  
  <p><strong>Additional information</strong>
  - I can build and publish from Visual Studio to my Azure web app. My API is working. I just cannot do it as part of CI / CD.
  - I don't understand this error because I don't understand why the DotNetCore are requesting a web.config.</p>