I'm facing a strange problem.
In a solution, I have a shared assembly info file (solution file) and linked it beside the regular AssemblyInfo.cs into my projects. Properties are set to build. Attributes that are shared between all project are in the SharedAssemblyInfo.cs file. Attributes specific to the project are in AssemblyInfo.cs.
Now when it comes to configuring log4net, the configuration file is only read when placing the log4net attribute in the SharedAssemblyInfo.cs. When I put it into AssemblyInfo.cs log4net will not initialize.
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
This makes no sense to me. I would understand that somehow if it only would work in AssemblyInfo.cs. Thought it could be the order of compilation or the order how the files are included in the csproj file, but this doesn't seem to matter.
Any idea?

Just found the root cause for the behavior.
I'm having assemblies like these:
Job.exe -> Shared.dll
In Shared.dll, I have a logging service that calls
LogManager.GetLogger(). It seems, the log4net assembly attribute needs to be in the assembly that first callsLogManager.GetLogger(). When I first callGetLogger()from Job.exe, Log4Net is initialized properly even if there is no log4net assembly attribute inShared.dll.Also found this in the docs:
If you configure Log4Net with this method, you run into the same issue when getting the logger from an assembly other than the entry assembly.