MelbourneDeveloper / Device.Net

A C# cross platform connected device framework
MIT License
620 stars 119 forks source link

ILoggerFactory copied from Microsoft.Extensions.Logging.Abstraction nuget #202

Open b2yq opened 3 years ago

b2yq commented 3 years ago

I have an error:

Error CS0433 The type 'ILoggerFactory' exists in both 'Device.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0...

I have checked and it looks like this interface has been copied into this repository from Microsoft repository and the worst thing is that its got the same namepsace so i can't use a namespace to point which type should be used. Is there any reason to not include directly Microsoft.Extensions.Logging.Abstraction nuget?

MelbourneDeveloper commented 3 years ago

That's only true in .net framework 4.5. That's not the case on other platforms

MelbourneDeveloper commented 3 years ago

Use .net core

b2yq commented 3 years ago

Thanks, i have an app in WPF and i have checked that i can't migrate to .net core 3.1 because one of its dependencies. I need to wait until all libraries will be ready.

So base on your response it looks like this library is not compatible with .NET Framework anymore? only .NET Core?

MelbourneDeveloper commented 3 years ago

Do your proof of concept on .net core first

If there is a legit problem with 4.5 it can be fixed.