Skip to content

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.

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