Skip to content

Update MSBuild Server docs: enabled by default in .NET 11 SDK - #11420

Closed
Jan Provazník (JanProvaznik) wants to merge 1 commit into
MicrosoftDocs:mainfrom
JanProvaznik:msbuild-server-default-net11
Closed

Update MSBuild Server docs: enabled by default in .NET 11 SDK#11420
Jan Provazník (JanProvaznik) wants to merge 1 commit into
MicrosoftDocs:mainfrom
JanProvaznik:msbuild-server-default-net11

Conversation

@JanProvaznik

Copy link
Copy Markdown
Contributor

Summary

MSBuild Server is enabled by default for MSBuild-based .NET CLI commands (dotnet build, dotnet msbuild) starting with the .NET 11 SDK. This page still described it as opt-in, and its opt-out guidance is now out of date. See dotnet/sdk#55231 (milestone 11.0-preview7), which flips DOTNET_CLI_USE_MSBUILD_SERVER to default true.

Changes

  • Default is now on. ## Enable MSBuild Server documents the .NET 11 default and keeps a sentence about the previous opt-in behavior for readers on earlier SDKs.
  • Removed the change wave 17.4 opt-out. This was the most important correction. Wave 17.4 has left the current change wave rotation, so SET MSBuildDisableFeaturesFromVersion=17.4 is now treated as out of rotation and enables all features rather than disabling MSBuild Server. Following the old instruction produces the opposite of the intended effect. MSBuild Server is no longer change-wave gated at all.
  • Corrected the opt-out value. DOTNET_CLI_USE_MSBUILD_SERVER is documented as false.
  • Documented -mt. Multithreaded builds engage MSBuild Server, because multithreaded execution runs project work inside the server process.
  • Documented in-process fallback. Invocations that cannot be hosted in a separate process (-help, -version, binary log replay) fall back to building in the launching process.
  • Added diagnostics guidance. Builds that request the server record whether one was started, reused, or not used and why; visible at -v:diag or in a binary log.

Verification

Claims were checked against the MSBuild implementation on main:

  • Default flip and opt-out precedence: MSBuildForwardingAppWithoutLogging.cs in dotnet/sdk (DOTNET_CLI_USE_MSBUILD_SERVER defaults to true; MSBUILDUSESERVER is only set when the user has not set it).
  • 15-minute idle shutdown: CommunicationsUtilities.NodeConnectionTimeout (900 * 1000 ms).
  • /nodemode:8: NodeMode.OutOfProcServerNode = 8.
  • Change wave rotation: ChangeWaves.AllWaves currently starts at 17.10, so 17.4 is out of rotation.
  • -mt implies server: XMake.ShouldUseMSBuildServer.

Notes for reviewers

  • ms.date refreshed; author/ms.author updated to the current owner.
  • Only the .NET 11 timing statement is forward-looking; everything else describes shipped behavior.

MSBuild Server is enabled by default for MSBuild-based .NET CLI commands
starting with the .NET 11 SDK (dotnet/sdk#55231).

- Document the new default and how to opt out with
  DOTNET_CLI_USE_MSBUILD_SERVER=false.
- Remove the change wave 17.4 opt-out. Wave 17.4 has left the current
  change wave rotation, so setting MSBuildDisableFeaturesFromVersion=17.4
  no longer disables the server and instead enables all features.
- Note that -mt (multithreaded) builds engage MSBuild Server, and that
  incompatible invocations such as -help, -version, and binary log replay
  fall back to an in-process build.
- Add guidance on inspecting server status via -v:diag or a binary log.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b3a0ade9-f512-4290-ac92-d8b23053a4ec
@prmerger-automator

Copy link
Copy Markdown
Contributor

Microsoft authors of articles need to make updates through the private repository, so the updates can be staged and validated by current validation rules. After you review staging and fix all validation issues, you can add the sign-off comment to let the PR reviewers know the updates are ready to be merged.

It's easy to access the private repo version of your articles in GitHub. Just add -pr to the URL, as follows:

 Public repo URL: https://github.com/MicrosoftDocs/{docs-repo}
 Private repo URL: https://github.com/MicrosoftDocs/{docs-repo-pr}

We have closed this pull request. Please resubmit the updates through the private repo. For more information, see the contributor guide.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 6914efa:

✅ Validation status: passed

File Status Preview URL Details
docs/msbuild/msbuild-server.md ✅Succeeded

For more details, please refer to the build report.

@prmerger-automator

Copy link
Copy Markdown
Contributor

PRMerger Results

Issue Description
File Change Percent This PR contains file(s) with more than 30% file change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant