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

Workaround for "MSB4166: Child node "1" exited prematurely" #11353

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

YuliiaKovalova
Copy link
Member

Fixes #11326

Context

BuildCheck can still emit some LogBuildEvent(s) after ProjectFinishedEventArgs was reported and entries from _projectFileMap were cleaned up.
Due to GetAndVerifyProjectFileFromContext validation, these checks break the build.

Changes Made

If BuildCheck is enabled, _projectFileMap won't be cleaned up. If it brings significant perf overhead , this approach will be reconsidered.

Testing

n/a

@YuliiaKovalova YuliiaKovalova changed the title Workaround ContextID {0} for project {1} should be in the ID-to-file mapping! Workaround for "MSB4166: Child node "1" exited prematurely" Jan 29, 2025
Copy link
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Please reconsider exposing state that is not used outside of the class - it's generally better to avoid this.

src/Build/BackEnd/Components/Logging/LoggingService.cs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling BuildCheck causes error MSB4166: Child node "1" exited prematurely
3 participants