This might be a possible gotcha if you are using IStartable facility in .NET 4.5 I am using the following code to start eagerly a component:
Component.For<HttpServer>().Start().StartUsingMethod(c => c.Start)); HttpServer class does not implement IStartable interface At the moment of Windsor registration I receive the following exception after I specified target for my project .NET 4.5 Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.SZArrayHelper.get_Item[T](Int32 index) at Castle.Facilities.Startable.StartableFacilityRegistrationExtensions.ObtainMethodName[TService](Expression`1 methodToUse) in c:\TeamCity\buildAgent\work\1a b5e0b25b145b19\src\Castle.Windsor\Facilities\Startable\StartableFacilityRegistrationExtensions.cs:line 108 at Castle.Facilities.Startable.StartableFacilityRegistrationExtensions.StartUsingMethod[TService](ComponentRegistration`1 registration, Expression`1 methodTo Use) in c:\TeamCity\buildAgent\work\1ab5e0b25b145b19\src\Castle.Windsor\Facilities\Startable\StartableFacilityRegistrationExtensions.cs:line 57 at XY.ZY.Server.Http.Installers.HttpWindsorInstaller.Install(IWindsorContainer container, IConfigurationStore store) at Castle.Windsor.Installer.AssemblyInstaller.Install(IWindsorContainer container, IConfigurationStore store) in c:\TeamCity\buildAgent\work\1ab5e0b25b145b19 \src\Castle.Windsor\Windsor\Installer\AssemblyInstaller.cs:line 57 at Castle.Windsor.Installer.CompositeInstaller.Install(IWindsorContainer container, IConfigurationStore store) in c:\TeamCity\buildAgent\work\1ab5e0b25b145b1 9\src\Castle.Windsor\Windsor\Installer\CompositeInstaller.cs:line 41 at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers, DefaultComponentInstaller scope) in c:\TeamCity\buildAgent\work\1ab5e0b25b145b19\s rc\Castle.Windsor\Windsor\WindsorContainer.cs:line 673 at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers) in c:\TeamCity\buildAgent\work\1ab5e0b25b145b19\src\Castle.Windsor\Windsor\Windsor Container.cs:line 660 If I remove the call to StartUsing and I implement IStartable in order to keep the behaviour, everything works OK. Regards, Robert On Thursday, August 16, 2012 5:32:32 AM UTC+3, Krzysztof Koźmic wrote: > > I'm using it with .NET 4.5 with no issues. We'll have dedicated .NET 4.5 > binaries in version 3.2 > > > -- > Krzysztof Kozmic > > On Thursday, 16 August 2012 at 12:22 PM, Scott_M wrote: > > Will the current Castle Windsor work with .NET 4.5 or is a new .NET 4.5 > version of Windsor necessary? Any gotcha's when using Windsor with .NET > 4.5? > > > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/castle-project-users/-/Vkv_FgNK2GsJ. > To post to this group, send email to > [email protected]<javascript:> > . > To unsubscribe from this group, send email to > [email protected] <javascript:>. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/castle-project-users/-/4SDawIRuXu0J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
