Skip to content

Conversation

tmat
Copy link
Member

@tmat tmat commented Oct 3, 2025

Requires dotnet/roslyn#80556, #51143

Splits dotnet-watch into two components: dotnet-watch CLI tool itself and Microsoft.DotNet.HotReload.Watch package with the core implementation.
The package does not include CLI parsing (no dependency on dotnet CLI commands) and legacy "no hot reload" mode.

The change also includes Microsoft.DotNet.HotReload.Watch.Aspire project that has IVT to Aspire.CLI (similar to Roslyn's External Access) and allows Aspire to launch the watcher.

Copy link
Contributor

github-actions bot commented Oct 3, 2025

This PR is targeting main, which is now for .NET 11-facing work. If you intended to target .NET 10, either retarget this PR to release/10.0.1xx or make sure you backport the change to release/10.0.1xx after merging. See #50394 for more details.

@github-actions github-actions bot added the Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch label Oct 3, 2025
Copy link
Contributor

Thanks for your PR, @@tmat.
To learn about the PR process and branching schedule of this repo, please take a look at the SDK PR Guide.

@DustinCampbell DustinCampbell self-requested a review October 3, 2025 22:30
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the dotnet-watch tool into a consumable package for Aspire.CLI by splitting it into two main components: the original CLI tool and a new Microsoft.DotNet.HotReload.Watch package containing the core implementation.

  • Extracts the core watch functionality into a reusable library package
  • Creates a new Aspire-specific project with IVT access for external consumption
  • Removes CLI-specific dependencies from the core package to eliminate command parsing logic

Reviewed Changes

Copilot reviewed 52 out of 98 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/BuiltInTools/Watch/Microsoft.DotNet.HotReload.Watch.csproj New core watch library project containing shared functionality
src/BuiltInTools/Watch.Aspire/Microsoft.DotNet.HotReload.Watch.Aspire.csproj New Aspire-specific executable package for external consumption
src/BuiltInTools/dotnet-watch/dotnet-watch.csproj Updated to reference the new core library instead of duplicating code
test/Microsoft.DotNet.HotReload.Test.Utilities/ New shared test utilities project extracted from existing tests
Various test files Updated imports and references to use the new shared test utilities

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 dug through the whole change, and it looks good.

@tmat tmat changed the base branch from main to release/10.0.2xx October 13, 2025 17:01
@tmat tmat requested review from a team as code owners October 13, 2025 17:01
@tmat tmat changed the base branch from release/10.0.2xx to main October 13, 2025 17:01
@tmat
Copy link
Member Author

tmat commented Oct 13, 2025

Moving to 10.0.2xx branch: #51123

@tmat tmat closed this Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants