-
Notifications
You must be signed in to change notification settings - Fork 29
ConfigureContainer(Registry registry) not called #22
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
Comments
What are you talking about?
There's no mentioning of The |
Hmm... my bad. I don't get ConfigureContainer called on ASP.NET Core 1.0.1. Digging further into this, support for it was added in ASP.NET Core 1.1. Here is And here is For 1.1 we can see on line 18 that it does look for a ConfigureContainer method, while 1.0.1 doesn't have that functionality. The StructureMap.AspNetCore package is useful only for 1.1, but this isn't mentioned anywhere. I checked and even the version isn't suggestive - it's 1.0.0, it should be the same as ASP.NET Core's version IMO (1.1). I have now seen the dependency on I suggest documenting that StructureMap.AspNetCore only supports ASP.NET Core 1.1. It works with 1.0 only if you use the overload that takes a Sorry for jumping to the conclusion that the package is useful, that was my mistake and I was too harsh. |
Sure, I'll clarify this in the documentation.
What does that mean? |
It means that in 1.0 you can create the container in any way you fancy and call this overload of There's no automatic support for
The first option doesn't need the I prefer the first option, as I can manually call |
I'm not sure what you're saying. In 1.1, which the library requires, you can, as you say, call either The second option you have, is to manually, as you've mentioned, return an instance of I'm not sure what you mean by "call |
My bad, I mixed up
Sure there is. Add it as a dependency, you will get |
Oh, I see what you're saying now. You get 1.1 of the DI-specific packages, but the hosting layer remains at 1.0 and won't know what to do with the |
Yeah, that's exactly right. Compatibility with 1.0 should be documented, but mentioned that the |
The README says that after calling
app.UseStructureMap()
the runtime will look for aConfigureContainer
method, however, there isn't any code that actually does this, so theStructureMap.AspNetCore
package is kinda useless on its own.The text was updated successfully, but these errors were encountered: