Skip to content

Exclude not working on blazor project #1379

@dazinator

Description

@dazinator

My xunit tests projejct references by backend asp.net core project, which hosts a front end blazor (wasm) project (and hence has a reference to it)

I am attempting to exclude this blazor project from code coverage.

The test is run via an azure devops yaml:

    - task: DotNetCoreCLI@2
      displayName: Test
      inputs:
        command: test
        projects: '**/*.Tests*.csproj'
        publishTestResults: true
        arguments: '--configuration $(BuildConfiguration) --no-build --collect "XPlat Code Coverage" /p:CoverletOutputFormat="cobertura%2copencover" /p:SkipAutoProps=true /p:Exclude="[Foo.Client]*"'

However after this runs, and I look at the report uploaded to devops, it still shows me types in the Foo.Client assemlby:

image

The exclude pattern appears correct to me, am I doing something wrong?

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