question

WonderfulWorld-6345 avatar image
0 Votes"
WonderfulWorld-6345 asked TianyuSun-MSFT answered

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

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?

dotnet-csharpdotnet-package-management
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TianyuSun-MSFT avatar image
0 Votes"
TianyuSun-MSFT answered

Hi @WonderfulWorld-6345 ,

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,
Tianyu


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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.