Skip to content

ConfigureContainer(IUnityContainer container) dont work in Startup class #70

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

Closed
PeterOscarsson opened this issue Dec 10, 2019 · 2 comments

Comments

@PeterOscarsson
Copy link

Take the default Unity Sample application for MS DI and add
public void ConfigureContainer(IUnityContainer container) to the startup class

=> InvalidCastException on CreateHostBuilder.

I have also tried to use the constructur to inject IUnityContainer but it wont work either.
(Should work according to doc)

Something seems to be broken.

NetCore 3.1 and Unity 5.11.4

Best regards.

@ENikS
Copy link
Contributor

ENikS commented Dec 10, 2019

Did you try this example?

@PeterOscarsson
Copy link
Author

Yes, I used that exact example, and just added

public void ConfigureContainer(IUnityContainer container)

to startup.cs

Not Working. :-(

@ENikS ENikS closed this as completed in ef0d013 Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants