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

Fix for Hot Reload in .NET 6 (issue #4789) - Use MethodHandle.Value #4820

Merged
merged 1 commit into from
May 23, 2022
Merged

Fix for Hot Reload in .NET 6 (issue #4789) - Use MethodHandle.Value #4820

merged 1 commit into from
May 23, 2022

Conversation

mchlstrng
Copy link
Contributor

@mchlstrng mchlstrng commented May 4, 2022

This fixes #4789

Use MethodHandle.Value instead of the MethodInfo object.

I'm not sure if anything else needs to be done, but Hot Reload is working now 🥳

@dnfadmin
Copy link

dnfadmin commented May 4, 2022

CLA assistant check
All CLA requirements met.

@mconnew
Copy link
Member

mconnew commented May 6, 2022

The dictionary is declared as Dictionary<object, string> which is causing the MethodHandle.Value to be boxed to an object. Can you change the _operationMap to be Dictionary<IntPtr, string> to avoid the boxing. It will make the lookup marginally faster too.

@mconnew mconnew merged commit ea9d0a9 into dotnet:main May 23, 2022
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.

System.NotSupportedException when using Hot Reload (VS 2022 - .NET 6)
3 participants