title: Azure Pipelines - Where is the CodeCoverage generated by VSTest@2?
body: <p>I have tried hundreds of times but I am still unable to find that codeCoverage file generated in VSTest task.</p>
  
  <p>See the following code.</p>
  
  <p>I simply want to publish the Code Coverage report to the pipeline.</p>
  
  <p>Help, please! </p>
  
  <p>Where is that code coverage file?</p>
  
  <p>Or give me some links if you don't want to waste time writing some answers.</p>
  
  <p>Many thanks!</p>
  
  <pre><code># ASP.NET
  # Build and test ASP.NET projects.
  # Add steps that publish symbols, save build artifacts, deploy, and more:
  # https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
  
  trigger:
    - master
  
  jobs:
    - job: devbuild
      pool:
        name: 'Self Hosted VS2017'
  
      variables:
        solution: '**/*.sln'
  
      steps:
        - task: NuGetToolInstaller@0
  
        - task: NuGetCommand@2
          inputs:
            restoreSolution: '$(solution)'
  
        - task: VSBuild@1
          inputs:
            solution: '$(solution)'
            msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:Configuration=Debug /p:Platform="Any CPU" /p:OutDir=".\output\dev"'
            clean: true
  
        - task: VisualStudioTestPlatformInstaller@1
          inputs:
            packageFeedSelector: 'nugetOrg'
            versionSelector: 'latestPreRelease'
  
        - task: VSTest@2
          inputs:
            testSelector: 'testAssemblies'
            testAssemblyVer2: |
              **\dev\*.Tests.dll
            searchFolder: '$(System.DefaultWorkingDirectory)'
  ****************************************************************************
  ************THIS GUY  =&gt;****************************************************
            codeCoverageEnabled: true
  **********************&lt;=****************************************************
  ****************************************************************************
            distributionBatchType: 'basedOnAssembly'
            dontDistribute: false
            publishRunAttachments: true
  
        - task: PublishCodeCoverageResults@1
          inputs:
            codeCoverageTool: 'cobertura'
            summaryFileLocation: '**/coverage.xml'
            reportDirectory: '**/coveragereport'
            failIfCoverageEmpty: true
  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/k8vMg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k8vMg.png" alt="I want this, image grabbed from internet"></a></p>