question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The type 'IConfiguration' exists in both Microsoft.Extensions.Configuration.Abstractions and Serilog.Sinks.Http

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
FantasticFiascocommented, Oct 18, 2020

@aleksaradz, the changes where perfect! @brian-pickens-web, I’ll continue with creating a release.

1reaction
aleksaradzcommented, Oct 16, 2020

@FantasticFiasco I just open pullrequest #139

Read more comments on GitHub >

github_iconTop 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 >
Serilog.Sinks.Http 8.0.0
A Serilog sink sending log events over HTTP.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found