Skip to content
  1. We help small teams achieve big things.
  2. Our Technical Fellow just became a Microsoft MVP!
  3. We run the Azure Weekly newsletter.
  4. We just won 2 awards.
  5. We just published Programming C# 8.0 book.
  6. We run the Power BI Weekly newsletter.
  7. Our NDC London 2020 is now available online!
  8. We are school STEM ambassadors.
Mike Larah By Mike Larah Software Engineer II

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).

ContainerBreakpoint

@MikeLarah

Mike Larah

Software Engineer II

Mike Larah

Mike is a Software Engineer at endjin with almost a decade of experience in solving business problems with technology. He has worked on a wide range of projects for clients across industries such as financial services, recruitment, and retail, with a strong focus on Azure technologies.