-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Resolve enforces passed arguments to be used (and fails because of it) #646
Comments
Hi @cytoph |
Also, from your description:
This behavior is intended and supposed to be working in the v5 and v5.4. But I am not sure how this behavior leads to the specific exception |
I tried to reproduce this with a smaller example, but I'm not able to. All I know is when my project references DryIoc.Microsoft.DependencyInjection 6.0.2 (DryIoc.dll 5.0.2) it works, with DryIoc.Microsoft.DependencyInjection 6.2.0 (DryIoc.dll 5.4.0) it doesn't. I'm still working on an example, but I'm not sure, if I'll be able to provide it. |
@cytoph Could you check if the same issue happens for the latest preview 6.0.0-preview-07? |
@cytoph Did you check with DryIoc v6 preview? |
I just updated DryIoc from version 5.0.2 to 5.4.0 and an error starts occurring (of which I could not find anything in breaking changes or such). The error occurs on calling
container.Resolve(serviceType, [service])
.service
is, in this case, a service instance that I want to be passed to theserviceType
constructor in place of the instance that is registered in the container (that's why I pass it). This worked fine before the update. Now, on version 5.4.0, I get an exception, because the container tries to pass this service instance to every other (undelying) service that is resolved during this call, and not just that, it forces it to be present in every constructor, it seems, which leads to the following exception:I didn't change anything on the containers rules or such. Is there a new rule or parameter that's now set by default, that I must explicitly disable to get this to work again?
The text was updated successfully, but these errors were encountered: