title: windsor ioc in console app
body: <p>I am working on a console application and I want to use castle windsor for di.  I have the following code in my Main method for the console app - </p>
  
  <pre><code>private static IWindsorContainer container;
  static void Main(string[] args)
  {
      container = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle")));
  ...
  </code></pre>
  
  <p>Here is my configuration file - </p>
  
  <pre><code>&lt;configSections&gt;
      &lt;section name="castle" type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, Castle.Windsor"/&gt;
    &lt;/configSections&gt;
  
    &lt;castle&gt;
      &lt;components&gt;
        &lt;component
          id="myrepository"
          service="_123App.Repositories.IMyRepository, _123App"
          type="_123App.Repositories.MyRepository, _123App"
        /&gt;
      &lt;/components&gt;
    &lt;/castle&gt;
  </code></pre>
  
  <p>when I run the app, I get the following error - </p>
  
  <pre><code>Could not convert from '_123App.Repositories.MyRepository, _123App' to System.Type - Maybe type could not be found
  </code></pre>
  
  <p>Does anyone know what might be happening here?  I used reflector to ensure that the assembly names are correct and everything is where it is supposed to be.
  Thanks for any thoughts.</p>
  
  <p>EDIT - Here is the whole exception stack trace - </p>
  
  <pre><code>Castle.MicroKernel.SubSystems.Conversion.ConverterException was unhandled
    Message=Could not convert from '_123App.Repositories.MyRepository, 123App._123App' to System.Type - Maybe type could not be found
    Source=Castle.Windsor
    StackTrace:
         at Castle.MicroKernel.SubSystems.Conversion.TypeNameConverter.PerformConversion(String value, Type targetType) in e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\MicroKernel\SubSystems\Conversion\TypeNameConverter.cs:line 91
         at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion(String value, Type targetType) in e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\MicroKernel\SubSystems\Conversion\DefaultConversionManager.cs:line 134
         at Castle.MicroKernel.SubSystems.Conversion.DefaultConversionManager.PerformConversion[TTarget](String value) in e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\MicroKernel\SubSystems\Conversion\DefaultConversionManager.cs:line 162
         at Castle.Windsor.Installer.DefaultComponentInstaller.SetUpComponents(IConfiguration[] configurations, IWindsorContainer container, IConversionManager converter) in e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\Installer\DefaultComponentInstaller.cs:line 196
         at Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store) in e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\Installer\DefaultComponentInstaller.cs:line 52
         at Castle.Windsor.WindsorContainer.RunInstaller() in e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\WindsorContainer.cs:line 314
         at Castle.Windsor.WindsorContainer..ctor(IConfigurationInterpreter interpreter) in e:\OSS.Code\Castle.Windsor\src\Castle.Windsor\Windsor\WindsorContainer.cs:line 87
         at _123App.Program.Main(String[] args) in C:\Users\Username\Documents\Visual Studio 2010\Projects\_123App\_123App\Program.cs:line 18
         at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
         at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
         at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
         at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
    InnerException: 
  </code></pre>