Share via

Why the class library has different supports for framework and .NET?

Y. Yakir 70 Reputation points
2026-02-06T07:31:05.0866667+00:00

Hi,

I looked on evolution of class library.

It used for reused.

As I see the class library has different supports for Framework and .NET.

Can you please explain it in more details , what are the option and what is roadmap for future ?

Every NuGet packaged that used has to support both Framework and .NET.

Thank in advance,

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

{count} vote

2 answers

Sort by: Most helpful
  1. Gade Harika (INFOSYS LIMITED) 2,590 Reputation points Microsoft External Staff
    2026-02-06T10:46:08.1666667+00:00

    Thanks for reaching out.
    Class libraries have different support because .NET Framework and modern .NET (.NET 5+) are different runtimes with different goals.

    • .NET Framework is Windows‑only and in maintenance mode. It receives security fixes but no new features. It exists mainly for legacy applications.
    • Modern .NET (.NET 5+) is the future platform. It is cross‑platform, actively developed, and gets new APIs, performance improvements, and long‑term support (LTS/STS).

    Because the available APIs differ, a single binary cannot always work for both runtimes.

    1. Multi‑targeting (recommended) Build one library that targets multiple frameworks (for example net48; net8.0). NuGet automatically selects the correct version for the consumer.
    2. .NET Standard (limited today) Useful only if you need broad compatibility with older platforms, but it is frozen and not recommended for new development.
    3. Separate libraries/packages Use this when you depend on runtime‑specific or Windows‑only APIs.

    Roadmap:

    • .NET Framework will continue to be supported with Windows but will not get new features.
    • Modern .NET is Microsoft’s strategic direction and should be used for all new libraries and applications.

    Important: Not every NuGet package must support both .NET Framework and modern .NET. Multi‑targeting is the correct and supported approach when you need to support both.

    Let us know if the issue persists after following these steps. I’ll be happy to assist further if needed. If the issue has been resolved, Kindly mark the provided solution as "Accept Answer", so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    2 people found this answer helpful.

  2. kagiyama yutaka 1,165 Reputation points
    2026-02-08T07:50:01.4766667+00:00

    I think the split is mostly ’cause we still run code from years back… so libs keep two TFMs just to not disturb some old system that can’t move anymore. nugets follow that.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.