-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Child Lifetime Scope - Lazy<T, TMetadata> Resolved Multiple Times #23
Comments
Verified, but I'm not sure what to do about it at the moment. I do see that we treat the two I also see both MEF sources are marked as such (one, two), which explains why we're seeing the symptom - the registration source is getting hit twice, so you see twice the dependencies. I gather one of those things needs to change - either the handling of registration sources in configured child scopes or the setting for @alistairjevans or @alsami do you have any off-the-cuff thoughts on which spot would be better? (I'm guessing the easiest spot to fix/test would be in this MEF repo.) |
@tillig I'd guess that this repository is the right one, if the problem is really only related with the extension. Which is the case, if I understood correctly. |
I'm on vacation right now, so no easy access to code, but I will say that the need for I'd argue you could probably just set Also worth raising an issue in the Core repo to address this more completely maybe? |
Yeah, I'm in hardcore head's down mode at work which is why I didn't just dive in right here. But I agree, I think just trying out this repo with |
Looks like just setting that value to |
Fix #23: Set registration sources to not be IsAdapterForIndividualComponents
Describe the Bug
Dependencies with Interface-Based Metadata are resolved multiple times when resolved from a child lifetime scope when the confgurationAction is supplied.
Steps to Reproduce
Reproduction Repo: https://github.com/oh-yeah/Autofac-metadata-issue
Expected Behavior
Resolution to be consistent across Lifetime scopes.
Exception with Stack Trace
Dependency Versions
Autofac: Version 6.x
Autofac.Mef: Version 6.0
Additional Info
The text was updated successfully, but these errors were encountered: