Skip to content

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
@ghost ghost 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

@dotnet-policy-service
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.

@tmat tmat merged commit 98f1043 into dotnet:release/9.0.3xx Jan 21, 2025
28 of 31 checks passed
@tmat tmat deleted the Agent3xx branch January 21, 2025 20:26
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.

2 participants