Skip to content

dotnet test builds each project separately leading to work duplication and conflicts #4682

Open
@nohwnd

Description

Describe the bug

dotnet test invokes dotnet run for each project. This leads to conflicts over shared libraries and duplicated work.

My test project has 4 test projects and a single tested class library. Running dotnet test will run into locking issues on build.

Steps To Reproduce

$env:DOTNET_CLI_TESTINGPLATFORM_ENABLE=1; dotnet test -bl

Image

binlogs: with class lib.zip

Expected behavior

Solution builds via msbuild, and lets it resolve the deps graph and parallelize the build.

Tests are then executed on the finalized projects.

Actual behavior

Each project is invoked in single msbuild run in parallel. Leading to no project tree optimizations, and clashes when two projects build the same dll at the same time.

Additional context

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions