-
Notifications
You must be signed in to change notification settings - Fork 5k
Use System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting #62903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tagging subscribers to this area: @hoyosjs Issue Detailsnull
|
This was added in #59962 |
@marek-safar Mono uses these too, to implement the There's a feature switch |
…o coreclr" This reverts commit 16a3ae1.
…veHosting feature switch to keep native hosting ComponentActivator dependencies
Updated PR to address the issue differently |
Naming nits: We have existing Would it make sense to call this one |
I agree with this name. |
I'd prefer to do the msbuild property rename in the follow-up PR as the definition primary lives in sdk and would make sense to change it there first. |
I have not realized that this name is in the SDK already. Fixing it up in follow up PR sounds good. |
feature switch to keep native hosting ComponentActivator dependencies to bring back no trimming warnings for System.Private.Corelib.
System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting
is by default disabled (false) when apps are trimmed. Users will need to pass_EnableConsumingManagedCodeFromNativeHosting
to re-enable native hosting withComponentActivator
I think that's fine becauseComponentActivator
is marked as never trimming safe, effectively making trimming + native hosting risky configuration.