Dependency injection

You can get this exception from Unity: Activation error occured while trying to get instance of type in many cases. And then you can try to look into InnerException stack to find only The type MyType cannot be constructed. You must configure the container to supply this value.. Below are the reasons that can lead to this error message:

The class you try instantiate (or dependent class) is abstract.

The class you try instantiate (or dependent class) has no public constructor.