Skip to content
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

Mark TypeBuilder.DefinePInvokeMethod as RequiresUnreferencedCode #45703

Closed
MichalStrehovsky opened this issue Dec 7, 2020 · 1 comment · Fixed by #56537
Closed

Mark TypeBuilder.DefinePInvokeMethod as RequiresUnreferencedCode #45703

MichalStrehovsky opened this issue Dec 7, 2020 · 1 comment · Fixed by #56537
Assignees
Labels
area-System.Reflection.Emit linkable-framework Issues associated with delivering a linker friendly framework
Milestone

Comments

@MichalStrehovsky
Copy link
Member

#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.

@MichalStrehovsky MichalStrehovsky added the linkable-framework Issues associated with delivering a linker friendly framework label Dec 7, 2020
@MichalStrehovsky MichalStrehovsky added this to the 6.0.0 milestone Dec 7, 2020
@Dotnet-GitSync-Bot
Copy link
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.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Dec 7, 2020
@joperezr joperezr removed the untriaged New issue has not been triaged by the area owner label Feb 4, 2021
@krwq krwq added the help wanted [up-for-grabs] Good issue for external contributors label Jul 22, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 29, 2021
@krwq krwq self-assigned this Jul 29, 2021
@eerhardt eerhardt removed the help wanted [up-for-grabs] Good issue for external contributors label Jul 30, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Aug 5, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Reflection.Emit linkable-framework Issues associated with delivering a linker friendly framework
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

6 participants