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

Adding System.Collections.Immutable into the mix #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SamuelBerger
Copy link

Hi Florian,
We are also hit by the "Could not load type 'System.Runtime.CompilerServices.IsReadOnlyAttribute' from assembly System.Collections.Immutable ..." when trying to upgrade to .NET 7.

I observed, that the System.Runtime.CompilerServices.IsReadOnlyAttribute is emitted to F# struct only when System.Collections.Immutable package is referenced in the project.

I have tried to build with the latest preview 7.0.200-preview.22628.1 as well, same result. But I am not sure, if the fix is already included there.
You've said I was able to compile my [repro] with the local compiler and the test now passes.

Could you try it again with this PR?

Cheers sam

@nojaf
Copy link
Owner

nojaf commented Feb 6, 2023

Hi Sam, I've changed my struct to a class in my production code instead.
In the grand scheme of things, the change was insignificant to my code and I could go on with my life.
System.Collections.Immutable was not a direct dependency so I had no control over that.

@SamuelBerger
Copy link
Author

I see :)
My only workaround would be implementing those structs in C#.
I will create an issue in the F# compiler then.
Thanks for replying and all the content you create! 🙏

@nojaf
Copy link
Owner

nojaf commented Feb 6, 2023

Out of curiosity, where can you download 7.0.200-preview.22628.1?

@SamuelBerger
Copy link
Author

Installing latest Visual Studio preview. I use Rider and VS remains only an SDK installer for me :)

@nojaf
Copy link
Owner

nojaf commented Feb 6, 2023

You could also try the 7.0.300 preview from https://github.com/dotnet/installer#table

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