I have an issue with FxCop and the warning: Abstract types should not have constructors
.
This is being displayed for a number of abstract classes (possibly all, I haven't checked). When I look most of them have no new method so I assume it's the complier adding a default one. So to remove it I add a private default constuctor (Private Sub New()
), this then means all the inherting classes fail to build with the error:
Class 'InheritingClass' has no accessible 'Sub New' and cannot be inherited.
This seems odd as FxCop requests no public constructor, but when I remove it the build fails.