Skip to content

Dont force .net 9 dependencies for csharp client #4313

@Kalmar99

Description

@Kalmar99

Describe the problem

I noticed that in the newer versions of the csharp client you have added a dependency on .NET 9 by relying on Microsoft.Extensions.Logging 9.0.0, unless this version of the package is required for the algolia client to work you should allow a range of versions. Atleast .net 8 should be supported as that is the current LTS version.

Describe the solution

Use version ranges and allow .net 8 (which is the current LTS) up to .net 9

basicly, replace:

  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
    <PackageReference Include="System.Text.Json" Version="9.0.0" />
  </ItemGroup>

with

  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Logging" Version="[8.0.0, 10.0.0)" />
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="[8.0.0, 10.0.0)" />
    <PackageReference Include="System.Text.Json" Version="[8.0.0, 10.0.0)" />
  </ItemGroup>

this will allow all versions of the dependencies up to latest minor on .net 9

https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort#version-ranges

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions