Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Code coverage for embedded pdb #1748

Closed
smadala opened this issue Aug 23, 2018 · 7 comments
Closed

Support Code coverage for embedded pdb #1748

smadala opened this issue Aug 23, 2018 · 7 comments
Assignees

Comments

@smadala
Copy link
Contributor

smadala commented Aug 23, 2018

Description

No code coverage data collected on dotnet test --collect "Code Coverage"

Steps to reproduce

Add <DebugType>Embedded</DebugType> to default test project.

  <Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <DebugType>Embedded</DebugType>
    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
    <PackageReference Include="MSTest.TestAdapter" Version="1.2.1" />
    <PackageReference Include="MSTest.TestFramework" Version="1.2.1" />
  </ItemGroup>

</Project>
  • Run dotnet test --collect "Code Coverage"

Expected behavior

Code coverage data should be collected

Actual behavior

No code coverage data collected

@smadala
Copy link
Contributor Author

smadala commented Aug 23, 2018

Fix for this planned in VS 16.0

/cc @VCZYK

@clairernovotny
Copy link
Member

How's this coming?

@clairernovotny
Copy link
Member

Ping? What SDK/NuGet version is this in?

@jasase
Copy link

jasase commented Apr 9, 2019

Any new information when this will be available?

@jakubch1 jakubch1 self-assigned this Apr 7, 2020
@MarkKharitonov
Copy link

We are waiting for that too.

@jakubch1
Copy link
Member

It is enough to install newer version of Microsoft.CodeCoverage:

dotnet add package Microsoft.CodeCoverage --version 16.7.0

I will make sure that dotnet also uses newer version of this package. Currently it is installing 16.5.

@jakubch1
Copy link
Member

It's enough to upgrade Microsoft.NET.Test.Sdk to 16.7.0 in csproj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants