The type 'IConfiguration' exists in both Microsoft.Extensions.Configuration.Abstractions and Serilog.Sinks.Http
See original GitHub issueDescribe the bug
Serilog.Sinks.Http contains Microsoft.Extensions.Configuration.Abstractions.IConfiguration
type and conflicts with the same type inside Microsoft’s configuration package. Why not put a package dependency on Microsoft.Extensions.Configuration.Abstractions
instead?
Is there currently a recommened way to deal with this?
Error CS0433 The type 'IConfiguration' exists in both 'Microsoft.Extensions.Configuration.Abstractions, Version=3.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' and 'Serilog.Sinks.Http, Version=7.0.1.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10' SomeProject C:\...\SomeFile.cs 18 Active
Edit: I dug into the source for this type and noticed that it is wrapped with compiler flags to include it into non netcore 2.0 targeted applications. Is there a reason for this? That means that I can’t use this sink with any other framework along with Microsoft’s configuration library?
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
Could not load file or assembly 'Microsoft.Extensions. ...
Extensions.Configuration in both the API and Functions app, but I'm still getting the same error. Any idea how to resolve this issue?
Read more >Adding Serilog to the ASP.NET Core Generic Host
In this post I introduce the Serilog.Extensions.Hosting package, discuss why it's necessary, and describe how to use it to add Serilog to a ......
Read more >ConfigurationExtensions.Exists(IConfigurationSection) ...
Determines whether the section has a Value or has children.
Read more >Dependency Injection in Azure Functions V3
I'm creating an instance the Serilog logger, with all the configuration for console and file sinks. Register this logger in the builder.Services ...
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
@aleksaradz, the changes where perfect! @brian-pickens-web, I’ll continue with creating a release.
@FantasticFiasco I just open pullrequest #139