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 }}
This repository was archived by the owner on May 1, 2024. It is now read-only.
I have a C# wrapper around a native macOS library for Xamarin, and want it to work with .NET 6 as well. It also has a package reference to a .NET Standard library.
However, if I try to consume any enum from that package, I get:
MyClass.cs(12,12): Error CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
publicclassMyClass{publicMyClass(){varx=System.IO.FileAccess.Read;// an enum from .NET Standardvary=System.Text.Json.JsonTokenType.Comment;// an enum from a package}}
This won't build. Oddly enough, the first line will build, and the second will not.
If I explicitly supply a hint path, it seems to work: