-
Notifications
You must be signed in to change notification settings - Fork 789
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
MethodAccessException on equality comparison of a record with private fields when building from VS 17.11.5 #17925
Comments
I just tried installing visual studio preview 17.12.0 preview 4.0.
Installing the preview installed an additional SDK and runtime, the list:
It seems that somehow VS 17.11.5 is using the wrong SDK version? |
Yeah, it's the same issue and was fixed in the later VS |
What I don’t understand is that it should build using the SDK indicated by ‘global.json’ right? |
It should, yes, but it might theoretically pick different locations for compiler itself (shipped with VS vs standalone) as well as different compilers (desktop/coreclr), it's currently hard to say what compiler was picked up for which version without binlog, we have quite complex logic for that. |
I think for me personally I can work around this until the next VS release, however if I can help by providing additional information I am happy to do so. I followed https://github.com/dotnet/project-system-tools?tab=readme-ov-file#getting-higher-fidelity-logs-from-vs-vs2022-onwards Not sure which of these files are interesting (and how to best share them here 😄) ? |
You can share them via email probably, sending to fsharp[at]microsoft.com, so we can look into it when we'll get to it. Thanks in advance! |
I am not on the allowed senders list it seems, I can send it to your private email if that is ok with you? |
Yeah, it's |
Consider creating a ticket on VS developer community - you can upload them privately there and the team can access them. |
We'll triage and investigate the community feedback issue |
Please provide a succinct description of the issue.
MethodAccessException on equality comparison of a record with private fields but only when building from visual studio (17.11.5).
This is (probably) somehow related to this issue #17447
The SDK should be pinned at 8.0.300 by the
global.json
file, this version should not have this problem I believe.Provide the steps required to reproduce the problem:
Currently installed sdks and runtimes:
Expected behavior
Actual behavior
Known workarounds
dotnet build equals.sln
.Now it simply runs as expected.
Related information
I added the following log target to the project files:
Which prints the expected 8.0.300 SDK version. Both when building from Visual Studio or from the CLI.
Additionally the installed sdks/runtimes:
Any pointer as to what could cause this or how to further investigate?
The text was updated successfully, but these errors were encountered: