.net core 未为dotnet核心项目生成Coverlet lcov.info文件

.net core 未为dotnet核心项目生成Coverlet lcov.info文件,.net-core,visual-studio-code,code-coverage,lcov,coverlet,.net Core,Visual Studio Code,Code Coverage,Lcov,Coverlet,我正在从事dotnet核心项目,在linux机器中使用D VS代码 以下博客将生成覆盖率报告: 如前所述,我正在传递dotnet测试参数,如下所示: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info 并希望生成lcov.info文件,但它没有 我有什么遗漏吗 附言:我已经包括这个包裹了 <PackageReference Include=&quo

我正在从事dotnet核心项目,在linux机器中使用D VS代码

以下博客将生成覆盖率报告:

如前所述,我正在传递dotnet测试参数,如下所示:

dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info
并希望生成lcov.info文件,但它没有

我有什么遗漏吗

附言:我已经包括这个包裹了

 <PackageReference Include="coverlet.collector" Version="1.3.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

全部的
运行时间;建设;本地人;内容文件;分析仪;可传递的

我过去常常遇到确切的问题。Hanselman的指南从未明确指示读者需要包
coverlet.msbuild
来指示.NET使用
/p:
语法收集代码覆盖率。通过在测试项目文件夹内执行以下命令,在测试项目中包括
coverlet.msbuild

dotnet add package coverlet.msbuild
测试项目的
*.csproj
文件应包含类似于以下内容的声明:

<PackageReference Include="coverlet.msbuild" Version="2.9.0"
    <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    <PrivateAssets>all</PrivateAssets>
</PackageReference>