我是国际奥委会和温莎城堡的新手。我想根据他们的文档使用Castle提供的日志记录工具
http://stw.castleproject.org/Windsor.Logging-Facility.ashx
我正在尝试根据文档建议注册该设施
container.AddFacility<LoggingFacility>(f => f.LogUsing(LoggerImplementation.Log4net).WithConfig("log4net.config"));我引用了Castle.Core和Castle.Facilities.Logging dll的
在编译时,我得到以下错误
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'. C:\Sports\app\Daedalsoft.Sports.ApplicationServices\WindsorServiceInstaller.cs任何帮助都将不胜感激。
发布于 2010-12-12 10:31:33
看起来您可能从以前的版本中引用了Castle.MicroKernel.dll。Castle.MicroKernel已合并到Castle.Windsor.dll中,如果您使用的是最新版本的Windsor,则不应该安装Castle.MicroKernel.dll。
还要确保您有对Castle.Services.Logging.Log4netIntegration.dll和log4net.dll的引用
https://stackoverflow.com/questions/4419690
复制相似问题