JetBrains Rider 2026.1 Help

Code inspection: Type specified in '[BaseTypeRequired]' attribute conflicts another type

This inspection reports an attribute type whose own [BaseTypeRequired] declarations conflict with each other. This happens when the attribute requires two incompatible concrete base classes. Since no target class can inherit from both, the attribute definition is internally inconsistent.

The fix is to remove or change one of the conflicting [BaseTypeRequired] declarations so the attribute has a consistent requirement.

using System; using JetBrains.Annotations; public class Bar { } public class Foo : Bar { } public class Foo2 : Bar { } [BaseTypeRequired(typeof(Foo2))] [BaseTypeRequired(typeof(Foo))] public class MyComponentAttribute : Attribute { }
using System; using JetBrains.Annotations; public class Bar { } public class Foo : Bar { } public class Foo2 : Bar { } [BaseTypeRequired(typeof(Foo))] public class MyComponentAttribute : Attribute { }
30 March 2026