canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.
MIT License
981 stars 143 forks source link

Binding an abstract type which has an abstract inheritor ToAllImplementations causes StyletIoCRegistrationException #355

Open sirdoombox opened 1 year ago

sirdoombox commented 1 year ago

Description Binding an abstract base type ToAllImplementations() when there is an abstract type in the assembly which inherits from it causes a StyletIoCRegistrationException.

To Reproduce

abstract class Foo { }
abstract class Bar : Foo { }
class FooBar : Bar { }
// ...
builder.Bind<Foo>().ToAllImplementations();

// On Building...
// StyletIoC.StyletIoCRegistrationException: Type Bar is not a concrete class, and so can't be used to implemented service Foo

Version Info