Skip to content

[Hot Reload] Parameterize DotNetWatchHotReload test and remove Mono STARTUP_HOOKS workaround - #11240

Merged
jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers/parameterize-vm-test
Apr 29, 2026
Merged

[Hot Reload] Parameterize DotNetWatchHotReload test and remove Mono STARTUP_HOOKS workaround#11240
jonathanpeppers merged 2 commits into
mainfrom
jonathanpeppers/parameterize-vm-test

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

Two related Hot Reload improvements:

  1. Parameterize DotNetWatchHotReload test for both MonoVM and CoreCLR runtimes instead of hardcoding MonoVM.

  2. Remove the RuntimeHostConfigurationOption workaround for STARTUP_HOOKS in HotReload.targets. This workaround was needed because Mono was not reading DOTNET_STARTUP_HOOKS from the environment. The upstream fix is now included in our pinned dotnet/dotnet:

…TARTUP_HOOKS workaround

Parameterize the `DotNetWatchHotReload` device test for both MonoVM and
CoreCLR runtimes instead of hardcoding MonoVM.

Remove the `RuntimeHostConfigurationOption` workaround for `STARTUP_HOOKS`
in `HotReload.targets` that was needed because Mono was not reading
`DOTNET_STARTUP_HOOKS` from the environment. This was fixed upstream in
dotnet/runtime:
dotnet/runtime@c8e2a61

The fix is included in our pinned dotnet/dotnet at:
dotnet/dotnet@ab01524

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates Hot Reload support to align with recent upstream runtime behavior and broadens device integration coverage across runtimes.

Changes:

  • Parameterizes the DotNetWatchHotReload MSBuild device integration test to run for both AndroidRuntime.MonoVM and AndroidRuntime.CoreCLR.
  • Removes the Mono-specific RuntimeHostConfigurationOption (STARTUP_HOOKS) workaround from Microsoft.Android.Sdk.HotReload.targets, relying on the runtime fix for DOTNET_STARTUP_HOOKS.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs Runs the Hot Reload dotnet watch device test for both MonoVM and CoreCLR.
src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.HotReload.targets Removes the legacy Mono STARTUP_HOOKS workaround now that the runtime reads DOTNET_STARTUP_HOOKS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers

Copy link
Copy Markdown
Member Author
image

The test passes.

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Apr 28, 2026
@jonathanpeppers
jonathanpeppers merged commit 05d6859 into main Apr 29, 2026
2 of 3 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers/parameterize-vm-test branch April 29, 2026 13:23
@github-actions github-actions Bot locked and limited conversation to collaborators May 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants