Skip to content

Mark TypeBuilder.DefinePInvokeMethod as RequiresUnreferencedCode #45703

Closed

Description

@MichalStrehovsky

#45633 (comment)

If linker didn't see the p/invoke, it would not have done the necessary work to ensure the generated marshalling code for the p/invoke can work (constructors might be missing for types used in out positions of the signature, the p/invoke might introduce COM into the process etc.).

We should put RequiresUnreferencedCodeAttribute on all overloads in the ref assembly and all the implementations.

Activity

  1. added this to the 6.0.0 milestone on Dec 7, 2020
  2. Dotnet-GitSync-Bot commented on Dec 7, 2020

    @Dotnet-GitSync-Bot
    Collaborator

    I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Feb 4, 2021
  4. added
    help wanted[up-for-grabs] Good issue for external contributors
    on Jul 22, 2021
  5. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jul 29, 2021
  6. self-assigned this
    on Jul 29, 2021
  7. removed
    help wanted[up-for-grabs] Good issue for external contributors
    on Jul 30, 2021
  8. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Aug 5, 2021
  9. ghost locked as resolved and limited conversation to collaborators on Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions