This repository was archived by the owner on Oct 20, 2023. It is now read-only.
Construction of service with unregistered interface as dependency fails silently when requested in a collection #149
Labels
bug
Something isn't working
Describe the bug
Resolving
IReadOnlyCollection<ICommon>
(or other collection types) with the configuration shown below results in a silent failure to constructDependency2
as the constructor parameter typeITransitiveDependency
is not registered.This behavior leads to hard to diagnose misconfigurations.
To Reproduce
Example code hosted here.
Expected behavior
The call to
container.GetInstance<IReadOnlyCollection<ICommon>>()
should fail with the same exception as the call tocontainer.GetInstance<Dependency2>()
.The text was updated successfully, but these errors were encountered: