-
Notifications
You must be signed in to change notification settings - Fork 9
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
The IEnumerable<Object> DependencyInjectionMvcDependencyResolver.GetServices(Type serviceType)
causes an NRE
#19
Comments
Thank you for the contribution! Looking at my original code I see that I do remember (during my development of support for ASP.NET MVC) that I broke DI by returning a non-null, but empty, I need to take a quick look at how ASP.NET MVC consumes the result of I see in the linked SimpleInjector thread that @dotnetjunkie writes (emphasis mine):
I assume he's correct on this though. Do you have a bug repro scenario for this issue? And do you have a unit-test or integration-test that proves this fixes it? Thanks again! |
To reproduce the issue, #17 would need to be resolved, and then visiting one of the basic routes in the |
I can confirm that the |
fix in fa60c05 |
I've just published version https://www.nuget.org/packages/Jehoel.AspNetDependencyInjection/5.0.0-beta01 https://www.nuget.org/packages/Jehoel.AspNetDependencyInjection.Mvc/5.0.0-beta01 |
I would, but I am not on that project anymore. I'm sorry. |
The
GetServices
call causes an NRE to happen when nothing can be resolved from the container.This issue is similar; coalescing an empty enumerable appears to resolve the issue.
The text was updated successfully, but these errors were encountered: