title: How to setup Application insights worker service using Windsor Castle for DI for .net framework console app?
body: <p>I have a couple of .net framework 4.6 console apps doing scheduled work. We want to setup logging of KPI's and exceptions using Application Insights.</p>
  
  <p>The apps are using Windsor Castle for dependency injection, and Im having a hard time setting up the AI-worker service SDK with this. Has anyone done this successfully? </p>
  
  <p>Im trying to follow this guide: <a href="https://docs.microsoft.com/sv-se/azure/azure-monitor/app/worker-service" rel="nofollow noreferrer">https://docs.microsoft.com/sv-se/azure/azure-monitor/app/worker-service</a></p>
  
  <p>I dont have a IServiceCollection-container as the example, so how do I run   "services.AddApplicationInsightsTelemetryWorkerService("instrumentationkeyhere");" with windsor instead?</p>
  
  <p>Example of one of my windsor registrations:  </p>
  
  <p>container.Register(Component.For().ImplementedBy().LifestyleTransient());</p>