Skip to content

Library currently targets only netstandard2.1 #63

@ali-norouzian

Description

@ali-norouzian

<TargetFramework>netstandard2.1</TargetFramework>


Description

The project currently targets:

<TargetFramework>netstandard2.1</TargetFramework>

While this works fine for modern .NET (Core 3.0+, .NET 5+, .NET 6+, etc.), it prevents consumers using .NET Framework 4.x or .NET Standard 2.0–only environments from referencing the library.

Problem

  • netstandard2.1 is not supported by .NET Framework 4.8 or earlier.
  • This limits compatibility for consumers that cannot yet upgrade to .NET 5+.
  • We lose the flexibility to support a broader range of projects (e.g., older class libraries, plugins, legacy integrations).

Suggested Solution

Switch to multi-targeting to support both legacy and modern environments:

<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>

This provides:

  • ✅ Backward compatibility with .NET Framework via netstandard2.0
  • 🚀 Access to modern APIs for .NET 6+/8.0 consumers
  • 💪 Future-proofing without sacrificing reach

Additional Notes

  • If any dependencies require netstandard2.1 or later, those can be conditionally included only for net8.0.
  • CI/CD pipelines might need to be updated to test against both frameworks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions