Introducing endjin composition framework 2.0 : Part 5 - Debugging
In the previous posts I've explained how to set up installers in your application, how to use the content factory, and how to set up the composition framework for ASP.NET. In this post I will show you how to debug the container.
If you try to resolve a component that has missing dependencies, the
Container will throw a
ContainerException. The exception message will show the dependency tree for the failing component - down to the service that is unable to be resolved.
This error usually indicates that you have either forgotten to define an installer that registers your component, there is no concrete type that inherits from the interface, or the installer is not defined correctly to find the concrete type.
After initializing the container, you can also set a breakpoint on it to inspect all components that have been installed and what components have not installed correctly (misconfigured components).