Skip to content

ComponentActivator will always be removed by trimming #15272

Open
@rseanhall

Description

@rseanhall

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions