-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
The startup hook feature is inherently linker unfriendly as it loads "random" assemblies and executes code in them. As such using it on applications which are trimmed by the linker is problematic and likely to break the app or the startup hook.
This issue is to determine if there's some technical solution we can implement to make this more predictable experience.
Linker will also mark the implementation code in CoreLib as unfriendly and this will need some changes (either suppression, feature switch or something else):
runtime/src/coreclr/src/System.Private.CoreLib/src/System/StartupHookProvider.cs
Line 100 in ec2209e
| private static void CallStartupHook(StartupHookNameOrPath startupHook) |
Potentially related feature might be marking assemblies which were linked per dotnet/linker#1194 as that could be used to detect linked apps by the customers.