Have you seen my answer over at http://stackoverflow.com/questions/4419690/register-castle-windsor-logging-facility In short, it seems that you have some assembly mismatch. LoggingFacility does of course implement IFacility so the type constraint should be satisfied.
-- Mauricio On Sun, Dec 12, 2010 at 12:57 AM, goforebroke <[email protected]> wrote: > I am just learning IOC and Windsor.. > > I have been reading the information supplied by the wiki > > http://stw.castleproject.org/Windsor.Facilities.ashx > > and > > http://stw.castleproject.org/Windsor.Logging-Facility.ashx > > Assembly References > > Castle.Core v2.5.1 > Castle.Windsor v2.5.1 > Castle.Facilities.Logging v2.5.1 > Castle.Services.Logging.Log4netIntegration v2.5.1 > > > I am trying to register a LoggingFacility in code per the > documentation > > container.AddFacility<LoggingFacility>(f => > f.LogUsing(LoggerImplementation.Log4net).WithConfig("log4net.xml")); > > I get a compiler error > > The type 'Castle.Facilities.Logging.LoggingFacility' cannot be used as > type parameter 'T' in the generic type or method > 'Castle.Windsor.IWindsorContainer.AddFacility<T>(System.Func<T,object>)'. > There is no implicit reference conversion from > 'Castle.Facilities.Logging.LoggingFacility' to > 'Castle.MicroKernel.IFacility'. > > Any help would be appreciated > > Thank you > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]<castle-project-users%[email protected]> > . > 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 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.
