Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet watch] Agent improvements #45997

Open
wants to merge 3 commits into
base: release/9.0.3xx
Choose a base branch
from
Open

Conversation

tmat
Copy link
Member

@tmat tmat commented Jan 15, 2025

Prepares agent for being shared between dotnet-watch and VS.

Addresses potential race condition that may occur when applying initial updates to the process. Previously the agent started listening for updates asynchronously in the startup hook. Updates that were performed before the process launched were therefore applied while the app was running. The app may have loaded and executed old code that was already updated before the app launched.

We now apply the initial set of updates synchronously, unless the debugger is attached, in which case the debugger is responsible for doing so.

Blocking for initial pipe connection also addresses potential race condition that may cause deadlock if breakpoints are placed to startup hooks and the agent is loaded by the debugger.

Implements static asset content updating. This is needed to support MAUI Blazor apps.

Ensures that the agent's startup hook is the first one loaded by the runtime, so that no code runs before the agent applies initial updates.

@tmat tmat requested a review from a team as a code owner January 15, 2025 15:25
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Jan 15, 2025
@tmat
Copy link
Member Author

tmat commented Jan 15, 2025

@phil-allen-msft ptal

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.

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 untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant