-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
This is the application/component hybrid scenario from dotnet/runtime#35465. When building as self-contained with trimming (either CopyUsed or Link), the custom native host is unable to call get_function_pointer for its custom entry point. Adding the following code makes it work, but is not ideal because ComponentActivator is an internal implementation detail that is subject to change in future releases of .NET.
[DynamicDependency("GetFunctionPointer(System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr)", "Internal.Runtime.InteropServices.ComponentActivator", "System.Private.CoreLib")]
Also if the application itself is trimmed, I don't know how to mark the delegate and/or the entry point method such that the linker knows not to trim it.