-3

Is that possible that a class library which is created in >NET 6 can be used as reference in ASP.NET Website created in .NET 4.7 framework

I didn't try any thing yet

  • 2
    **Only** if that class library is targetting **.NET Standard 2.0** - otherwise **no**, you can't do that – marc_s Mar 13 '23 at 07:01
  • 1
    `I didn't try any thing yet` Please do not ask questions without have tried anything. [How to ask](https://stackoverflow.com/help/how-to-ask) – Martin Mar 13 '23 at 07:10

1 Answers1

2

If you can build the .NET 6 package as .NET Standard library then yes. Otherwise not.

For example a .NET Standard 2.0 library can be used in:

.NET Framework 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Martin
  • 3,096
  • 1
  • 26
  • 46
  • 1
    And it **has to be** .NET Standard **2.0** - not 2.1 - to support the "old" .NET framework .. – marc_s Mar 13 '23 at 07:11