-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Currently the only way to pass information between the host and the runtime is the "runtime properties" array. This array is not pay-for-play, all the properties which the runtime will ever know must be in it. This means that if there are properties which are filled by the host itself (like TRUSTED_PLATFORM_ASSEMBLIES), all the applications will pay the price to create the property and pass it to the runtime.
The cost associated with the property is non-zero, there are 3-4 copied of the property names and values made during startup.
It would be beneficial to have a pay-for-play mechanism of getting information from the host, and eventually not just information by entire services. The host could expose useful information (which is useful for a very limited set of apps though), like:
- Path to the muxer used to runt he app (if there's any)
- Path to the
.runtimeconfig.jsonused by the app (if any)
As for services we're already running into this problem today. The AssemblyDependencyResolver relies on services provided by hostpolicy. Today the communication is done via special APIs on hostpolicy, which means the runtime/corelib have hardcoded dependency on hostpolicy itself. This prevents hosts which are not using our hosting libraries unable to provide such services. (This is not very common and in general we encourage users to always rely on our hosting components, but the direct hosting API still exists and is supported).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status