Skip to content

[dotnet-watch] File based programs, build improvements and polyglot Aspire pre-requisites#52648

Merged
tmat merged 17 commits intodotnet:release/10.0.3xxfrom
tmat:FileBasedPrograms
Feb 25, 2026
Merged

[dotnet-watch] File based programs, build improvements and polyglot Aspire pre-requisites#52648
tmat merged 17 commits intodotnet:release/10.0.3xxfrom
tmat:FileBasedPrograms

Conversation

@tmat
Copy link
Member

@tmat tmat commented Jan 23, 2026

Multiple changes building on top of each other -- recommended to review commit-by-commit:

  • Switches to HotReloadMSBuildWorkspace introduced by HotReloadMSBuildWorkspace roslyn#81577 -- allows us to remove OOP build host and avoid extra design-time build.
  • Implements support for file based programs:
    • Adds --file command line switch
    • Provides custom ProjectInstance factory to ProjectGraph loader, which synthesizes project for .cs file.
  • Uses msbuild BuildManager type to parallelize DTB
    • Improves loading of a graph of 108 projects from 202s to 17s on 48 core CPU.
  • Allows loading project graphs with multiple roots to support polyglot Aspire, where the app host doesn't have references to resource projects (resource projects are the roots of the graph).
  • Improves auto-restart logic to restart projects that do not support Hot Reload.
    • E.g. AOT trimmed projects, F# projects, projects with TFM < 6.0, projects that fail to establish browser refresh connection, etc.)
  • Make arguments to log messages strongly typed (MessageDescriptor<TArgs>).
    • To avoid mistakes when passing arguments
    • To allow future polyglot Aspire impl to define ILogger that forwards select status messages to Aspire controller
  • Fixes a race condition that occurs when shutdown is requested after the process is launched but before the newly created RunningProject is published.
  • Fix race condition that can occur when shutdown is requested while Aspire session is being started.
    • The Aspire service factory may be disposed while a session is being started, before the session object gets registered. The newly created process gets orphaned and doesn't exit before the dotnet watch process terminates. This causes a test that validates termination of all processes to hang.

Fixes #51469

@tmat tmat changed the base branch from main to release/10.0.3xx January 23, 2026 00:14
@tmat tmat force-pushed the FileBasedPrograms branch from 1e151de to 52da47c Compare January 30, 2026 19:41
@tmat tmat force-pushed the FileBasedPrograms branch from 52da47c to deba64e Compare February 7, 2026 20:07
@tmat tmat changed the title File based programs File based programs++ Feb 7, 2026
@tmat tmat force-pushed the FileBasedPrograms branch 2 times, most recently from 13caf2c to b82a003 Compare February 10, 2026 17:05
@tmat tmat force-pushed the FileBasedPrograms branch 2 times, most recently from bc1492b to 79cbd69 Compare February 16, 2026 19:25
@tmat tmat force-pushed the FileBasedPrograms branch 3 times, most recently from 71b9082 to 9225359 Compare February 19, 2026 01:06
@tmat tmat changed the title File based programs++ [dotnet-watch] File based programs, build improvements and polyglot Aspire pre-requisites Feb 19, 2026
@tmat tmat force-pushed the FileBasedPrograms branch 5 times, most recently from e98f949 to f1c8cf8 Compare February 20, 2026 00:54
@tmat tmat marked this pull request as ready for review February 20, 2026 00:54
Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still reviewing and am about 60 files in.

Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it through the rest of the PR. There's lots of good stuff in here. 😄

@tmat
Copy link
Member Author

tmat commented Feb 24, 2026

I made it through the rest of the PR.

Much appreciated! It's a big PR.

@tmat tmat force-pushed the FileBasedPrograms branch from 4bd5c79 to bc05c5d Compare February 24, 2026 04:02
@tmat tmat enabled auto-merge (rebase) February 24, 2026 04:03
@tmat tmat force-pushed the FileBasedPrograms branch from bc05c5d to f402ddd Compare February 24, 2026 15:58
@tmat
Copy link
Member Author

tmat commented Feb 25, 2026

/ba-g Known Linux CI issue.

@tmat tmat merged commit 6b35c82 into dotnet:release/10.0.3xx Feb 25, 2026
26 of 28 checks passed
@tmat tmat deleted the FileBasedPrograms branch February 25, 2026 18:15
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.

3 participants