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

update MonoMod.Core to 1.2.2 to address net9 issue #637

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

stiefeljackal
Copy link
Contributor

This PR address the issue with Harmony when running under .NET 9. As @tyb-dev pointed out, .NET 9 changed LocalBuilder from sealed partial class to abstract class. Due to this, MonoMod.Core on 1.2.1 was failing because it was attempting to create an instance of LocalBuilder, resulting in the following:

System.MemberAccessException : Cannot create an instance of System.Reflection.Emit.LocalBuilder because it is an abstract class.

MonoMod.Core was updated to 1.2.2 roughly six days ago to address this update to LocalBuilder. Updating the package reference to 1.2.2 addresses this issue with Harmony, and all tests are now passing. There was one test that required an update due to type checking for LocalBuilder (now RuntimeLocalBuilder when on .NET 9).

@pardeike
Copy link
Owner

Thanks, last time I checked it was not released

@pardeike pardeike merged commit f957040 into pardeike:master Dec 17, 2024
23 of 27 checks passed
@stiefeljackal stiefeljackal deleted the fix/net-9 branch December 17, 2024 21:29
@pardeike pardeike mentioned this pull request Dec 17, 2024
@stiefeljackal stiefeljackal restored the fix/net-9 branch December 17, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants