Log4Net doesn’t write log in release mode - Console Application

前端 未结 5 2148
清酒与你
清酒与你 2020-12-19 08:45

I have a console application and have a class library which wraps the Log4Net methods. Now when run the application in debug mode it writes log but when it is built in relea

5条回答
  •  自闭症患者
    2020-12-19 09:22

    The line [assembly: log4net.Config.XmlConfigurator(Watch = true)] should be added to your AssemblyInfo.cs file in the Properties folder.

    enter image description here

提交回复
热议问题