Search code examples
c#log4net

How to disable log4net.xml file generation


I'm trying to use Log4net for my c# application. But when my application runs it generates log4net.xml file. As I read , It includes some information related to use in .NET documentation . But I no need this file or documentation.

How to disable log4net.xml file generation.


Solution

  • Your application is NOT generating this file. This file is part of the Log4Net project alongside with the assembly (log4net.dll) and the public debugging symbols (log4net.pdb). Those file are simply copied to your application's output directory. If you don't want to have them (even though it is strongly recommended to keep them), you could remove them from the source.

    If on the other hand you downloaded the source code of Log4Net and compiled it yourself, then you could disable XML documentation generation in the properties of the project. In this case no log4net.xml file will be emitted.