Skip to content

Assembly marked as ExcludeFromCodeCoverage is not excluded #290

@SefaOray

Description

@SefaOray

Description
When an assembly decorated with ExcludeFromCodeCoverage attribute, it is not excluded from coverage report.

Repro steps
Example code:

using System.Diagnostics.CodeAnalysis;
using System

[assembly: ExcludeFromCodeCoverage]
namespace ExampleNs
{
    public class ExampleClass:
    {
        public Guid Id { get; set; }
    }
}

Expected behavior
Assembly is excluded from the coverage report

Actual behavior
Assembly is included in the coverage report

Known workarounds
Passing the assembly with --exclude "[Assembly]*" works

Related information
Cross platform .NET Core code coverage tool version 1.3.0.0
Visual Studio Version: Visual Studio Professional 2017
Microsoft (R) Test Execution Command Line Tool Version 15.9.0
Test project build with .Net Core 2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions