Mixing net standard and net framework

Y a h y a 416 Reputation points
2020-11-26T01:34:41.69+00:00

Hi

Can one have both net standard 2.0 and net framework 4.8 projects in the same solution with net Standard project referencing the net framework project?

Thanks

Regards

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,558 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 27,031 Reputation points Microsoft Vendor
    2020-11-26T10:10:32.207+00:00

    Hi @Y a h y a ,

    Thank you for taking time to post this issue in Microsoft Q&A forum.

    Yes, you can reference the .Net Framework project in a .Net Standard project. (both .NET Standard 2.0 and .NET Framework 4.8 projects in the same solution)

    As you can see, this document: .NET implementation support provides a table which lists the minimum implementation versions that support each .NET Standard version. For example, the .NET Framework 4.6 supports .NET Standard 1.3 and earlier versions, so .NET Standard 2.0 is supported by .NET Framework 4.6.1 and higher versions(include .NET Framework 4.8).

    Also, please note that for .NET Framework 4.8 the table doesn’t list it, instead, as you can see, N/A^3, which means “.NET Framework doesn’t support .NET Standard 2.1”. So .NET Framework 4.8 doesn’t support .NET Standard 2.1, but only support .NET Standard 2.0 and earlier versions.

    I hope this helps.

    Best Regards,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful