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

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

Open
nohwnd opened this issue Jan 16, 2025 · 1 comment
Labels
External: dotnet test `dotnet test` integration
Milestone

Comments

@nohwnd
Copy link
Member

nohwnd commented Jan 16, 2025

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

@nohwnd nohwnd added the External: dotnet test `dotnet test` integration label Jan 16, 2025
@nohwnd nohwnd added this to the .NET 10 milestone Jan 16, 2025
@nohwnd
Copy link
Member Author

nohwnd commented Jan 16, 2025

TestProject4.zip

project example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External: dotnet test `dotnet test` integration
Projects
None yet
Development

No branches or pull requests

1 participant