.Net Core 2.0 Log4Net AdoNetAppender不能正常工作

我们在.Net Core 2.0控制台中基于Log4Net创建了通用日志库,FileAppender工作正常,但是我们想要登录到SQ DB并尝试使用AdoNetAppender,我们得到以下错误

System.TypeLoadException:无法从程序集'log4net,Version = 2.0.8.0,Culture = neutral,PublicKeyToken = 669e0ddf0bb1aa2a'加载类型'log4net.Appender.AdoNetAppender' . at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly,String name,Boolean throwOnError,Boolean ignoreCase,ObjectHandleOnStack type,ObjectHandleOnStack keepAlive)at System.Reflection.RuntimeAssembly.GetType(String name,Boolean throwOnError,Boolean ignoreCase)at log4net.Repository . Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)log4net:找不到名为[AdoNetAppender]的ERROR Appender .

似乎.Net Core 2.0不支持AdoNetAppender

这里不在列表中:https://logging.apache.org/log4net/release/framework-support.html#Appenders

回答(0)