mperdeck/Common.Logging.Log4Net.Universal

jsonlog.logger - error occurred creating the configuration section handler

Opened this issue · 2 comments

Please ignore this as I posted in the wrong area.

Hi,

I have updated all my Nuget packages and something has broken the Jsnlog logging. My backend logging continues to work but not my logging from my .js files.

I get this error:
image

I noticed this error in an Application Insights log:

"message": "Could not load file or assembly 'Common.Logging.Log4Net.Universal' or one of its dependencies. The system cannot find the file specified.",

but it is in my packages folder:
image

Logs.zip

The full error message, packages.config and the web.config are attached.

I have spent half a day researching this and I have not found a solution. Your help will be appreciated.

Thanks.

What version of .net is your project targeting? I had issues with Common.Logging.Log4Net.Universal's nuget package not adding the reference to my project. Turns out I had to target .NET Framework 4.6.1. I was presented with a similar error to yours at runtime. I wonder if you're having the same issue?

I had a build warning that tipped me off to the issue (oddly enough the window would always get cleared so unless I was watching it like a hawk, I wouldn't see it).

Here's my build warning:
1>------ Build started: Project: MyProject, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,5): warning MSB3274: The primary reference "Common.Logging.Log4Net.Universal" could not be resolved because it was built against the ".NETFramework,Version=v4.6.1" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5".
1> MyProject -> C:\dev\Source\git\MyProject\bin\MyProject.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Please see this
mperdeck/jsnlog#155
for my findings.