-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The type 'IConfiguration' exists in both Microsoft.Extensions.Configuration.Abstractions and Serilog.Sinks.Http #135
Comments
Hi there and welcome to this repository! A maintainer will be with you shortly, but first and foremost I would like to thank you for taking the time to report this issue. Quality is of the highest priority for us, and we would never release anything with known defects. We aim to do our best but unfortunately you are here because you encountered something we didn't expect. Lets see if we can figure out what went wrong and provide a remedy for it. |
FYI - My short term solution to fixing this is downgrading to v6, before the type was added. |
Maybe I've misconfigured the compiler flag. Which .NET version are you using? |
And which version of Microsoft.Extensions.Configuration are you referencing? |
The version of the Microsoft.Extensions.Configuration extension I'm using is 3.1.8, but I'm sure almost every version of that library has an IConfiguration type in that namespace. For our application we are targeting full net framework. Which is why the compiler flag is including your custom type. However this issue would occur for any lower version of netstandard, as well as for netstandard 2.1 which is soon to release. |
Yeah I think you are correct. I'll have to fix this issue, but haven't got the time tonight. I'll start working on it during the weekend, are you able to use the old version until a fix has been created? |
@FantasticFiasco As the type will be available for all .NET Standards version, do we need to remove that type from the library? |
Yes, that will be the first thing I investigate. I'm happy to do it, but if any of you are participating in Hackoctober you are free to open up a PR and count is as a part of your monthly goal. Just make sure I've got permissions to push to your fork. |
@FantasticFiasco yeah, I just forked the repo, and will try to fix this issue, and will create PR with a solution! 😀 |
I just wanted to wrap my head around this thing. My intention is to keep the same API for all supported versions, and shim Let's start with the .NET version we build for.
Now let's look at the versions Microsoft.Extensions.Configuration v3.1.8 is built for.
According to .NET implementation support, this is the .NET implementation support.
That ought to mean that the following versions we build for is supported by
Which lets me believe that the only version we need to shim support for Can any of you please verify my reasoning? |
@FantasticFiasco Your reasoning looks correct to me... Projects that target .NET 4.6.1 can consume .NET Standard 2.0 libraries and can consume I can help with the pullrequest if you want |
I would love it, if you are willing. Please let me know if I can help in any way. |
@FantasticFiasco I just open pullrequest #139 |
@aleksaradz, the changes where perfect! |
@brian-pickens-web v7.1.0 is now live on nuget.org. Would you be able to verify that it fixes this 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 onMicrosoft.Extensions.Configuration.Abstractions
instead?Is there currently a recommened way to deal with this?
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?
The text was updated successfully, but these errors were encountered: