Referrencing .NET 6 assembly package in a .NET Framework 4.8 assembly

Wonderful World 21 Reputation points

I have a .NET 6 assembly which is uploaded to nuget as a package, and another .NET Framework 4.8 assembly.

Can the .NET 6 assembly package be referenced in the .NET Framework 4.8 assembly, and can it run without generating any exceptions?

Microsoft Technologies based on the .NET software framework.
3,638 questions
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.
10,640 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor

    Hi @Wonderful World ,

    Welcome to Microsoft Q&A forum.

    It will not work, but directly reference the .NET 6 assembly may work(instead of installing and referencing the NuGet package). Note, even if directly referencing the assembly works, it may also cause errors during developing and building.

    Best Regards,

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      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 comments No comments

0 additional answers

Sort by: Most helpful