Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context: dotnet/sdk#52492
Context: https://github.com/dotnet/runtime/blob/79609d7dbef01231b0694a356de1d4e5618785cd/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs#L32
Context: https://github.com/dotnet/runtime/blob/79609d7dbef01231b0694a356de1d4e5618785cd/src/mono/mono/metadata/object.c#L8137-L8140
Context: b2332ca

Added a new DeployHotReloadAgentConfiguration MSBuild target that dotnet-watch can use to configure Hot Reload for Android apps.

Notes on runtimes:

  • MonoVM currently passes string.Empty to ProcessStartupHooks and relies on reading STARTUP_HOOKS from AppContext.

  • To fix CoreCLR, we can read DOTNET_STARTUP_HOOKS from environment variables, and pass to ProcessStartupHooks.

  • NativeAOT likely works as-is.

I added/updated tests to verify these changes.

Context: dotnet/sdk#52492
Context: https://github.com/dotnet/runtime/blob/79609d7dbef01231b0694a356de1d4e5618785cd/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs#L32
Context: https://github.com/dotnet/runtime/blob/79609d7dbef01231b0694a356de1d4e5618785cd/src/mono/mono/metadata/object.c#L8137-L8140
Context: b2332ca

Added a new `DeployHotReloadAgentConfiguration` MSBuild target that
`dotnet-watch` can use to configure Hot Reload for Android apps.

Notes on runtimes:

* MonoVM currently passes `string.Empty` to `ProcessStartupHooks` and
  relies on reading `STARTUP_HOOKS` from `AppContext`.

* To fix CoreCLR, we can read `DOTNET_STARTUP_HOOKS` from environment
  variables, and pass to `ProcessStartupHooks`.

* NativeAOT likely works as-is.

I added/updated tests to verify these changes.
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.

2 participants