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
IReadOnlySet<T> is exposed as internal if added to an assembly via the NuGet System.Collections.Immutable package (version 8.0.0+, I believe), but the interface is public in .NET 5+.
Reproduction Steps
Create a project that targets, for example, .NET Framewor4 4.6.2 and add the latest version of the System.Collections.Immutable NugetPackage (9.0.6 as of this writing).
Attempt to create a variable with a type of, say IReadOnlySet<string>.
The compiler raises error CS0122, 'IReadOnlySet<T>' is inaccessible due to its protection level.
Regression?
No response
Known Workarounds
No response
Configuration
This behavior appears with .NET (< 5) and .NET Framework versions that are supported by the System.Collections.Immutable NugetPackage version 9.0.6 (probably any version from 8.0.0 through 9.0.6).
Other information
My use case involves a collection that wraps FrozenSet<T> in a .NET Framework project. I'd like to expose it as IReadOnlySet<T>, but the NuGet package's implementation prevents this.