HttpClientToCurlGenerator
HttpClientToCurlGenerator copied to clipboard
Library currently targets only netstandard2.1
https://github.com/amingolmahalle/HttpClientToCurlGenerator/blob/7d18a69cd00e4861e609a3bd7b057db8c586c2ed/src/HttpClientToCurl/HttpClientToCurl.csproj#L7
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.1is 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.1or later, those can be conditionally included only fornet8.0. - CI/CD pipelines might need to be updated to test against both frameworks.
Thank you, dear @ali-norouzian. If you agree, I can assign you.