Why is the C # compiler generating CS0436 warnings for inner classes?
I am using JetBrains annotations in a C # solution. I have brought the annotation classes into each solution project as a linked file. I didn't want JetBrains annotations to be part of my public interface, so I changed them to be internal and not public.
However, when I compile, I get a lot of CS0436 warnings like:
C: \ src \ foo \ bar.cs (12,29): warning CS0436: type 'JetBrains.Annotations.NotNullAttribute' in 'C: \ src \ Common \ JetBrains \ JetBrains.cs' conflicts with imported type' JetBrains.Annotations .NotNullAttribute 'to' c: \ src \ blah \ bin \ Debug \ blah.dll '. Using the type defined in 'C: \ src \ Common \ JetBrains \ JetBrains.cs'.
But in JetBrains.cs NotNullAttribute is internal:
internal sealed class NotNullAttribute : Attribute { }
I don't understand why the compiler is warning about importing types that are internal to another assembly. Any ideas?
source to share