title: How to run unit test coverage report using coverlet inside a container?
body: <p>I'm using mcr.microsoft.com/dotnet/core/sdk:2.2 image to run unit tests inside a container. It is failing to generate coverage report by throwing following error.</p>
  
  <pre><code>error : One or more errors occurred. 
  (Could not find file '/tmp/xunit.runner.visualstudio.dotnetcore.testadapter
  </code></pre>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM mcr.microsoft.com/dotnet/core/sdk:2.2
  WORKDIR /app
  COPY . /app
  CMD [ "bash", "./build.sh" ]
  </code></pre>
  
  <p>build.sh</p>
  
  <pre><code>#!bin/bash
  
  export PATH="$PATH:/root/.dotnet/tools"
  
  echo "Installing Tools"
  dotnet tool install --global coverlet.console
  
  echo "Adding Package"
  dotnet add &lt;.csproj&gt; package coverlet.msbuild
  
  echo "Running Tests"
  dotnet test &lt;.csproj&gt; /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput='./coverage/'
  
  </code></pre>