MVC ArgumentNullException webObjectActivator is null
TheJayMann opened this issue · comments
When attempting to set up dependency injection using MvcApplicationDependencyInjection.ConfigureMvc
, it attempts to create a DependencyInjectionWebObjectActivatorDependencyResolver
passing in the value of the WebObjectActivator
property from the base. However, the constructor of ApplicationDependencyInjection
never sets this property, thus it is null. I would assume that either the property needs to be set in the constructor, or the property should be redefined such that it exposes the private woa value, such as protected internal DependencyInjectionWebObjectActivator WebObjectActivator => woa;
This is now fixed and published in version 3.3.0.. Thank you for the issue report :)
Great. With this done, I shall continue testing this with mixed WebForms and MVC projects to make sure this works well for our other projects.
This is a weird one. I can see the changes you made to fix this in the master branch now. However, I am still getting the error after updating to 3.3 nuget packages, and, using ILSpy to look at the assemblies deployed with 3.3, it still shows the old code in it. Perhaps the deployment strategy used did not deploy with the updated code?
@TheJayMann That's weird - I can confirm repro.
I've just published version 3.4.0
which I think should be correct now.