Closed adamrodger closed 5 years ago
Thank you @adamrodger - I agree, we should probably switch wholeheartedly to the 2.0 packages in a new release.
Help appreciated if anyone is interested in sending a PR.
If anyone got this error, ensure you install same version of the following from nuget in my case, I had 1.1.2, made all assemblies to same version to fix the issue.
Note: If you referenced a project and if that had Microsoft.Extensions.Logging 2.0.0, you need to go to that project and match the version. (in my case, I downgraded to 1.1.2)
Had the same problem with conflicts and downgrade was not possible.
I tried a small change, <PackageReference Include="Microsoft.Extensions.Logging" Version="2.*" />
, it seems to work.
dev
is now targeting 2.0.0.
The dependencies for Net 4.6.1 upgrade the minimum version of Microsoft.Extensions.Logging to 2.0.0 even though .Net 4.6 only requires 1.0.0.
This means if you install the package into a solution using .Net 4.6.1 and ASP.Net Core 1.1 then you receive an exception at runtime:
I really don't think it makes sense to require different major versions of the same dependency depending on the target framework, especially in a way that can cause runtime exceptions in consuming projects.
The line causing this problem is:
https://github.com/serilog/serilog-extensions-logging/blob/0faeefb1f27ef6ed3ccb760feebe013856c289cc/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj#L32