Skip to content

How to get MSBuild binary logs from MTP with dotnet test? #6719

@martincostello

Description

@martincostello

I have a custom MSBuild target that I call ReportGenerator with, which is defined with AfterTargets="InvokeTestingPlatform", but it isn't firing.

I tried to debug this with an MSBuild binary log, but the log doesn't appear to contain any trace of the InvokeTestingPlatform target.

I ran dotnet test -bl, which generates msbuild.binlog and msbuild-dotnet-test.binlog, but neither find the InvokeTestingPlatform target in it, but I know it's running as I can see the effects of another target I have that is defined with BeforeTargets="_MTPAddArguments;InvokeTestingPlatform".

I can see the MTP build in msbuild.binlog:

Image

But msbuild-dotnet-test.binlog doesn't appear to contain anything other than evaluation:

Image

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