Skip to content
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

[Suggestion] Downgrade Microsoft.Extensions.Logging.Abstractions version #208

Closed
ebejko opened this issue Jun 19, 2024 · 3 comments
Closed
Labels

Comments

@ebejko
Copy link

ebejko commented Jun 19, 2024

The commit 3c76521 bumped the MEL Abstractions version to 6.0.1. From what I saw this dependency is used only for the LogLevel enum, and in my opinion should use the earliest possible (non deprecated) version of the library. The 2.1.0 or 2.1.1 version should be fine.

The problem came up when trying to add a recent version of this awesome library in a legacy project that forces an older version of MEL Abstractions.

@ebejko ebejko changed the title [Suggestion] Downgrade Microsoft.Extensions.Logging.Abstraction version [Suggestion] Downgrade Microsoft.Extensions.Logging.Abstractions version Jun 19, 2024
@altmann altmann added the v3.16 label Jun 19, 2024
altmann added a commit that referenced this issue Jun 28, 2024
@altmann
Copy link
Owner

altmann commented Jun 30, 2024

Implemented with v3.16

@altmann altmann closed this as completed Jun 30, 2024
@chalmersj
Copy link

I have a project with MEL 8.0.0 and I'm getting an exception when using FluentResults:

System.TypeInitializationException: The type initializer for 'FluentResults.Result' threw an exception.
 ---> System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The parameter is incorrect. (0x80070057 (E_INVALIDARG))
File name: 'Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
 ---> System.ArgumentException: IntegrationLoadContext requested assembly Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 version 2.1.1.0, but shared version 8.0.0.0 was found. Major versions must match.

Does this mean I can't use FluentResults unless I downgrade my dependency on MEL?

@savornicesei
Copy link

savornicesei commented Dec 24, 2024

You can try <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> in your .props or .csproj file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants