You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before the upgrade in the version 5.5, this worked and you could resolve a Dog using both traditional injection into e.g. a constructor (ICanine), as well as via something like an AnimalFactory when you have an ID.
Now with the latest Zenject, I am getting:
ZenjectException: Assert hit! Attempted to use AsSingle multiple times for type 'Dog'. As of Zenject 6+, AsSingle as can no longer be used for the same type across different bindings. See the upgrade guide for details.
I am unsure how to resolve it since you can't use WithId() on a single binding where first interface needs to resolve without an ID.
The text was updated successfully, but these errors were encountered:
Consider this example:
Before the upgrade in the version 5.5, this worked and you could resolve a
Dog
using both traditional injection into e.g. a constructor (ICanine
), as well as via something like an AnimalFactory when you have an ID.Now with the latest Zenject, I am getting:
I am unsure how to resolve it since you can't use WithId() on a single binding where first interface needs to resolve without an ID.
The text was updated successfully, but these errors were encountered: