log4net 与 .NET 4.0
我已经整理了一些代码来修补新的 .Net 4.0/VS 2010 部分,但我似乎找不到我选择的 4.0 日志框架 (log4net) 的构建,并且我收到了引用错误2.0版本。哪里有 4.0 版本可用吗?我并不是要求新功能,只是要求一个已经针对新程序集重建的版本。有人知道我在哪里可以找到为 4.0 框架构建的 1.2.10 版本吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
log4net 存在一个已知问题,即引用不属于 的 System.Web 组件。 NET Framework 4 Client Profile 和 VS2010 默认情况下将项目目标设置为轻量级 Client Profile。
解决方案是将目标更改为.NET Framework 4:
右键单击项目->属性->应用。
更改:
为:
...这应该有效,即您可以再次使用 log4net...
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:
to be:
... and that should work, i.e. you can use log4net again...