log4net的使用.NET 4.0 [英] log4net with .NET 4.0

查看:167
本文介绍了log4net的使用.NET 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一起抛出一些code鼓捣新的.NET 4.0 / VS 2010件,但我似乎无法找到我的日志选择的框架(log4net的)构建为4.0,而我敢让引用错误的2.0版本。是否有一个4.0版本的地方?我不要求新的功能,只是这已经被重建了对新的程序集版本。任何人都知道在哪里可以找到的1.2.10构建建成为4.0框架?

I've thrown together some code to tinker with the new .Net 4.0/VS 2010 pieces, but I can't seem to find a build of my logging framework of choice (log4net) for 4.0, and I'm getting reference errors with the 2.0 version. Is there a 4.0 version available somewhere? I'm not asking for new features, just a version that's already been rebuilt against the new assemblies. Anyone know where I can find a build of 1.2.10 built for the 4.0 framework?

推荐答案

log4net的有引用的System.Web组件,它不是的。NET Framework 4的客户端配置文件和Visual Studio 2010的默认设置项目的目标是轻质的客户端配置文件。 该解决方案是将目标更改为.NET Framework 4的:

log4net has a known issue of referencing a System.Web component which is not part of the .NET Framework 4 Client Profile and the VS2010 by default sets project target to be the lightweighted Client Profile. The solution is to change the target to .NET Framework 4:

右键单击项目 - >属性 - >应用程序。 变化:

Right click project -> properties -> Application. Change:

 .NET Framework 4 Client Profile

是:

 .NET Framework 4

...这应该工作,即你可以使用log4net的一次...

... and that should work, i.e. you can use log4net again...

这篇关于log4net的使用.NET 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆