You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MethodAccessException on equality comparison of a record with private fields #17447
I was just trying out the VS preview version (to see if it had the fix for #17161) when I ran into this, so this does not really affect me that much for now.
Hello (@KevinRansom), will this be released for .NET 8.0.x? We, automatically, installed 8.0.400 through windows update on our build servers.
Projects which did not pin the SDK (or allowed feature updates by using "rollForward": "latestFeature" in their global.json) crash, at runtime, on production, if they happen to have an equality comparison in a untested code path.
It seems to me that this should be a major issue for many users? Or are we doing something out of the ordinary here?
Reacted by Thecentury, svdijk, tobinstultiens and Thomas Schouten
Activity
vzarytovskii commentedon Jul 25, 2024
Likely caused by #16857 (or by realsig, or by mixture of both)
vzarytovskii commentedon Jul 25, 2024
Method is generated as internal for some reason:

vzarytovskii commentedon Jul 25, 2024
@iminashi I suppose itermediate workaroud would be to add IVT attribute to the first assembly (the one which test is using), until we implement a fix.
psfinaki commentedon Jul 25, 2024
Yes, the above helps (putting InternalsVisibleTo).
iminashi commentedon Jul 25, 2024
I was just trying out the VS preview version (to see if it had the fix for #17161) when I ran into this, so this does not really affect me that much for now.
psfinaki commentedon Jul 25, 2024
Note,
--realsig+also seems to fix the issue.Fixes dotnet#17447 -MethodAccessException on equality comparison of a…
OkkeHendriks commentedon Sep 5, 2024
Hello (@KevinRansom), will this be released for .NET 8.0.x? We, automatically, installed 8.0.400 through windows update on our build servers.
Projects which did not pin the SDK (or allowed feature updates by using
"rollForward": "latestFeature"in theirglobal.json) crash, at runtime, on production, if they happen to have an equality comparison in a untested code path.It seems to me that this should be a major issue for many users? Or are we doing something out of the ordinary here?
Fixes dotnet#17447 -MethodAccessException on equality comparison of a…
Merge release/dev17.12 to main (#17842)