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

Replace and remove IL injection in PresentationCore #4911

Merged
merged 6 commits into from
Jul 26, 2021
Merged

Conversation

ryalanms
Copy link
Member

@ryalanms ryalanms commented Jul 23, 2021

Module initializers are now supported with a single attribute. As a prerequisite to updating the WPF repo to build against C# 10, this change adds the single ModuleInitializer attribute to PresentationCore and removes the IL injection logic from the WPF repo.

The module initializer without IL injection is working as expected:

PresentationCore.dll!ModuleInitializer.Initialize() Line 21 C#
PresentationCore.dll!.() Unknown
[Native to Managed Transition]

Prior to C# 9, the PresentationCore assembly was built, disassembled to IL, combined with additional IL containing a module initializer, and reassembled to a final PresentationCore assembly.

Related:
#3885
#4748
#4889

/cc @rladuca @vatsan-madhavan @SamBent

@ryalanms ryalanms requested review from rladuca, vatsan-madhavan and a team July 23, 2021 16:57
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jul 23, 2021
@ghost ghost requested review from fabiant3 and SamBent July 23, 2021 16:57
@ryalanms
Copy link
Member Author

global.json and versions.props still need to be updated.

@vatsan-madhavan
Copy link
Member

lgtm. Have you checked IL-diff's before vs after that everthing looks good?

Copy link
Member

@vatsan-madhavan vatsan-madhavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at IL-diff with @ryalanms over Teams - changes look good 👍

@ryalanms ryalanms merged commit 853d351 into main Jul 26, 2021
@ryalanms ryalanms deleted the remove.il.injection branch July 26, 2021 21:29
@ghost ghost locked as resolved and limited conversation to collaborators Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants