Remove FEATURE_NODE_REUSE conditional; always enable node reuse.#13209
Merged
MichalPavlik merged 2 commits intomainfrom Feb 19, 2026
Merged
Remove FEATURE_NODE_REUSE conditional; always enable node reuse.#13209MichalPavlik merged 2 commits intomainfrom
MichalPavlik merged 2 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the FEATURE_NODE_REUSE conditional compilation symbol, making node reuse functionality always available throughout the MSBuild codebase. Node reuse is a feature that allows worker node processes to stay idle in the background and be reused by multiple build requests, improving build performance.
Changes:
- Removed
FEATURE_NODE_REUSEfrom build configuration (Directory.BeforeCommon.targets) - Made node reuse logic unconditional in XMake.cs, removing conditional initialization and validation
- Enabled the
/nodereusecommand-line switch unconditionally in CommandLineSwitches.cs - Unconditionally enabled node reuse tests in CommandLineSwitches_Tests.cs
- Removed conditional compilation directives from NodeProviderOutOfProcBase.cs and BuildParameters.cs
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Directory.BeforeCommon.targets | Removed FEATURE_NODE_REUSE from DefineConstants for both .NET Framework and .NET Core targets |
| src/MSBuild/XMake.cs | Made enableNodeReuse default to true unconditionally; removed conditional compilation logic and related comments |
| src/MSBuild/CommandLine/CommandLineSwitches.cs | Made nodereuse switch always available by removing conditional compilation |
| src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs | Enabled node reuse parameter identification and processing tests unconditionally |
| src/Build/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs | Made node reuse connection logic unconditional |
| src/Build/BackEnd/BuildManager/BuildParameters.cs | Made _enableNodeReuse field default to true unconditionally |
rainersigwald
approved these changes
Feb 6, 2026
This was referenced Feb 19, 2026
JanProvaznik
pushed a commit
to JanProvaznik/msbuild
that referenced
this pull request
Feb 25, 2026
…net#13209) Simple Friday PR :) Just removing the FEATURE_NODE_REUSE constant since node reuse should be available everywhere anyway. This change removes the FEATURE_NODE_REUSE compilation symbol and all related conditional code, making node reuse logic unconditional throughout the codebase. The /nodereuse switch and its tests are now always available, and build configuration is simplified by eliminating the symbol from Directory.BeforeCommon.targets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simple Friday PR :) Just removing the FEATURE_NODE_REUSE constant since node reuse should be available everywhere anyway.
This change removes the FEATURE_NODE_REUSE compilation symbol and all related conditional code, making node reuse logic unconditional throughout the codebase. The /nodereuse switch and its tests are now always available, and build configuration is simplified by eliminating the symbol from Directory.BeforeCommon.targets.