Device.Net icon indicating copy to clipboard operation
Device.Net copied to clipboard

ILoggerFactory copied from Microsoft.Extensions.Logging.Abstraction nuget

Open b2yq opened this issue 4 years ago • 4 comments

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?

b2yq avatar May 02 '21 10:05 b2yq

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

MelbourneDeveloper avatar May 02 '21 11:05 MelbourneDeveloper

Use .net core

MelbourneDeveloper avatar May 02 '21 11:05 MelbourneDeveloper

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?

b2yq avatar May 02 '21 11:05 b2yq

Do your proof of concept on .net core first

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

MelbourneDeveloper avatar May 02 '21 19:05 MelbourneDeveloper