Skip to content

MSBuild build server shutdown should use pid files for server discovery. #9303

@peterhuene

Description

@peterhuene

This is a tracking issue for future feature work.

Steps to reproduce

  1. dotnet build-server shutdown

Expected behavior

No messages are printed out about the MSBuild server shutting down unless it was actually running.

Actual behavior

It always prints a message about the MSBuild compiler server shutting down. This is because the implementation does not dynamically discover the running servers (like the Razor implementation does) using pid files written out by the server.

Currently an MSBuild API is used to shut down all MSBuild nodes if they are running. This is implemented using a process scan for running dotnet executables. Ideally, MSBuild would also write out pid files for their running servers so that either dotnet or the API can do the discovery (if the latter, some visibility into what is running and what shut down as a result of the command would be desired).

Environment data

.NET Core SDK (reflecting any global.json):
 Version:   2.1.300-preview3-008647
 Commit:    00b6dfa681

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.13
 OS Platform: Darwin
 RID:         osx-x64
 Base Path:   /Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/sdk/2.1.300-preview3-008647/

Host (useful for support):
  Version: 2.1.0-preview3-26411-06
  Commit:  8faa8fcfcf

.NET Core SDKs installed:
  2.1.300-preview3-008647 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-preview2-30475 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-preview2-30475 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.0-preview3-26411-06 [/Users/peterhuene/src/cli/bin/2/osx-x64/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions