log4net with .NET 4.0

后端 未结 1 1248
刺人心
刺人心 2020-12-03 04:36

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\

相关标签:
1条回答
  • 2020-12-03 05:17

    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
    

    to be:

     .NET Framework 4
    

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

    0 讨论(0)
提交回复
热议问题