Skip to content

MSBuild server manual builds validation checklist #13896

@JanProvaznik

Description

@JanProvaznik

Goal

Validate that MSBuild server works correctly across the partner repos below. For each repo run the three scenarios listed under Required steps and capture the hard evidence described under Hard evidence. If anything fails, file a follow-up comment on this issue with a specific reproduction and the error output.

Required steps (run for each repo)

For each repo, perform all three of the following invocations from the repo root after a clean clone / clean build, and confirm the server process lingers between builds.

  1. Freshly built MSBuild (/mt enabled):

    $env:MSBUILDUSESERVER=1
    $env:DOTNET_CLI_USE_MSBUILD_SERVER=1
    dotnet build /mt /bl

    Use the dotnet / MSBuild.dll produced by a local build of dotnet/msbuild main.

  2. dotnet SDK 11 daily (without /mt):

    $env:MSBUILDUSESERVER=1
    $env:DOTNET_CLI_USE_MSBUILD_SERVER=1
    dotnet build /bl

    Install from https://github.com/dotnet/sdk/blob/main/documentation/package-table.md (daily channel).

  3. dotnet SDK 10.0.300 (without /mt):

    $env:MSBUILDUSESERVER=1
    $env:DOTNET_CLI_USE_MSBUILD_SERVER=1
    dotnet build /bl

For each scenario verify:

  • The build succeeds.
  • An MSBuild server process is started and lingers after the build exits (check with Get-Process MSBuild / ps).
  • The hard-evidence log lines below appear in the expected order.

Hard evidence

Before invoking dotnet build, also set:

$env:MSBUILDDEBUGCOMM=1
$env:MSBUILDDEBUGPATH="C:\msbuild-server-logs"   # or any writable directory

Then inspect <MSBUILDDEBUGPATH>\MSBuild_NodeMode_<pid>.txt for the following lines:

Line Meaning
Starting new server node with handshake ... a server process started
Building with MSBuild server with command line ... this build was dispatched to the server
Server was not running. Starting server now. client launched the server
Server is busy, falling back to former behavior. client decided to run in-proc
Server started with PID: <pid> the launched server's PID

A successful first build should show Server was not running. Starting server now. + Starting new server node with handshake ... + Server started with PID: <pid>. A successful second build in the same session should show Building with MSBuild server with command line ... without a new "Starting new server node" line (i.e. the existing server is reused).

Partner repos – dotnet/

Partner repos – high-impact OSS C# projects

Reporting issues

If any of the scenarios above fails (build error, missing log lines, server not lingering, server falling back to in-proc, crash, perf regression), please add a comment on this issue containing:

  1. Repo + commit SHA tested.
  2. Which of the three scenarios (freshly built MSBuild /mt, SDK 11 daily, SDK 10.0.300).
  3. Exact command line used.
  4. Relevant excerpt from MSBuild_NodeMode_<pid>.txt.
  5. The .binlog (attach via gist / drag-and-drop) and the console output of the failing command.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions