'Making a Visual Studio Extension with .Net Core

By default, Visual Studio 2022 Extension (Add-in) Project is on .Net Framework (not .Net 5 or 6). When I manually .csproj > PropertyGroup > TargetFramework XML value to net5.0, I run into a compile error.

Some of my projects are made with .Net 5 and it cannot be built with multiple targets (i.e. both .Net 5 and .Net Framework), which are needed to be referenced by my Visual Studio Extension project. Unfortunately, a .Net Framework project cannot reference a .Net 5 project, on the other hand, the vice versa can be partially available.

Is there any way of making Visual Studio Extensions with .Net 5 or later? If it cannot be done, how can I have my Visual Studio Extension project reference a .Net 5 based libraries(.dll)?



Solution 1:[1]

Visual Studio itself is currently a .NET 4.8 application, so you can't use .NET 5 stuff in it anywhere.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jason Malinowski