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

Versioning of dependency on Microsoft.Extensions.Options #150

Open
older opened this issue Jan 14, 2021 · 4 comments
Open

Versioning of dependency on Microsoft.Extensions.Options #150

older opened this issue Jan 14, 2021 · 4 comments

Comments

@older
Copy link

older commented Jan 14, 2021

Right now dependency on Microsoft.Extensions.Options is set to version 5.0.0 for all target frameworks.
This makes it impossible to use in Azure Functions as Azure Functions runtime is not yet updated to .NET 5.
Would it be possible to set this reference to lowest supported LTS version per target framework:

  • 2.1.1 for netstandard2.0
  • 3.1.11 for netstandard2.1
  • 5.0.0 for net5.0
@oschwald
Copy link
Member

Would you be able to expand on why this is necessary? That is a package reference to the NuGet package. Why do you need .NET 5.0?

@older
Copy link
Author

older commented Jan 14, 2021

@oschwald This NuGet package sets minimal version of Microsoft.Extensions.Options to version 5.0.0 so my function app is built with this version when I have reference on MaxMind.GeoIP2. But Azure Functions runtime is built with version 3.x and this version is loaded by runtime before my application starts. So as a result I get this exception. This is easily reproducible and happens not only when the app is deployed to Azure, but also if I run it locally using Azure Functions tools.

@kabilanvk
Copy link

Since .Net 5 for functions shows it's still in PREVIEW. I had to stick to 3.1 then reverting to MaxMind.GeoIP2 3.3.0 worked for me.

@older
Copy link
Author

older commented May 25, 2021

It is not only for functions. According to this comment from Microsoft's engineering manager for ASP.NET Core, Entity Framework, and Winforms, versions of extensions packages should match the major/minor of the ASP.NET Core.

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

No branches or pull requests

3 participants