ClrDebug icon indicating copy to clipboard operation
ClrDebug copied to clipboard

HostFxr Enhancements

Open lordmilko opened this issue 2 years ago • 0 comments

  • Identify/document why hostfxr_get_dotnet_environment_info isn't in hostfxr.dll distributed in NuGet packages
  • Provide a GetRuntimeDelegate method that doesn't take a hostfxr_delegate_type and returns a GetRuntimeDelegateDelegates wrapper that provides access to the various well known delegate types
    • https://github.com/dotnet/runtime/blob/82fdd0bf83cebf71dcc49a03cfd3cbe0fa9b6280/docs/design/features/native-hosting.md
    • https://learn.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting
    • https://github.com/dotnet/runtime/blob/71a3d36e5cdaf1e2d41957fb1d2cebff8af0e063/src/native/corehost/coreclr_delegates.h#L24
    • https://github.com/dotnet/runtime/blob/71a3d36e5cdaf1e2d41957fb1d2cebff8af0e063/src/native/corehost/fxr/hostfxr.cpp#L653
    • https://github.com/dotnet/runtime/blob/71a3d36e5cdaf1e2d41957fb1d2cebff8af0e063/src/native/corehost/hostpolicy/hostpolicy.cpp#L485
  • Add a sample that uses NativeAOT + hostfxr and runs a managed application, and verifies that the CLR isn't actually loaded within ourselves (so we know we're in NativeAOT mode)

lordmilko avatar Aug 18 '23 08:08 lordmilko