Incompatibility with asp.net core 2.x
See original GitHub issueDescribe the bug
- Serilog.Sinks.Http 7.2.0/8.0.0-beta.7 both can’t be installed to asp.net core 2.x on dotnet 2.x project with error message:
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Microsoft.Extensions.Configuration. Install/reference Microsoft.Extensions.Configuration 3.1.9 directly to project netcore21aspnetcore to resolve this issue.
netcore21aspnetcore -> Serilog.Sinks.Http 7.2.0 -> Microsoft.Extensions.Configuration (>= 3.1.9)
netcore21aspnetcore -> Microsoft.AspNetCore.App 2.1.1 -> Microsoft.Extensions.Configuration (>= 2.1.1 && < 2.2.0). netcore21aspnetcore C:\Users\user\RiderProjects\ComatCheck\netcore21aspnetcore\netcore21aspnetcore.csproj 1
- Serilog.Sinks.Http 8.0.0-beta.7 with asp.net core 2.x on net46+ project causes runtime exception during start:
System.TypeLoadException: Could not load type 'Microsoft.Extensions.Primitives.InplaceStringBuilder' from assembly 'Microsoft.Extensions.Primitives, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
at Microsoft.Net.Http.Headers.DateTimeFormatter.ToRfc1123String(DateTimeOffset dateTime, Boolean quoted)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.DateHeaderValueManager.SetDateValues(DateTimeOffset value)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.DateHeaderValueManager.OnHeartbeat(DateTimeOffset now)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.Heartbeat.OnHeartbeat()
(Additional context - https://github.com/dotnet/aspnetcore/issues/27986)
. To Reproduce First case:
dotnet new webapp --framework netcoreapp2.1 -o superproj
cd superproj
dotnet add package serilog.sinks.http
Second case: Visual Studo => New Project => ASP.NET Core Web App => “Run on .NET Framework” checkbox => Add “Serilog.Sinks.Http 8.0.0-beta.7” => Run project
Reason Reason for both cases- too high lower version of Microsoft.Extensions.Configuration.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Compatibility version for ASP.NET Core MVC
To see how SetCompatibilityVersion works with ASP.NET Core 2.x apps, select the ASP.NET Core 2.2 version of this article.
Read more >ASP.NET Core breaking changes for versions 3.0 and 3.1
The new None parameter causes compatibility problems with clients that implemented the prior ... NET Core 2.x can also be used for ASP....
Read more >Is .NET Core Runtime backwards compatible with previous ...
NET Core runtime updates are compatible within a major version 'band' such as 1.x and 2.x. In other words: (Minor updates within the...
Read more >NET agent: compatibility and requirements for .NET Core
NET agent only supports versions of .NET 5.0 or higher. The agent is not compatible with .NET Core versions 1.0 or 1.1. For...
Read more >Running .NET Core Apps on a Framework other than ...
Here I'm running .NET Core 3.0 application, using .NET Core 3.1: and that works. .NET Core Runtime Compatibility. So what works and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, it’s not an uncomplicated problem to support
Microsoft.Extensions.Configuration
it seems. I will investigate how other packages manages to support it.Another solution I’ve been thinking about the last couple of days is to remove the transient dependency altogether. That instead of passing in a
IConfiguration
implementation to the sink, one could pass aFunc<string, string>
, which basically has the same functionality as theMicrosoft.Extensions.Configuration
package..NET Standard 1.3 support was added due to the Open-source library guidance, but I now see that the guidance has been updated with the release of .NET Standard 2.0. I’ll create a new issue making sure that we continue to follow the guidance.