Adding WinForm support to an existing .NET core project

Initially, when opening an existing .NET core project in Visual Studio 2019, there is no option to add a new "Form" item.

To enable it, edit the project file, ensure these exist:


 <PropertyGroup>
    <TargetFramework>net5.0-windows</TargetFramework> 
    <UseWindowsForms>true</UseWindowsForms>
    ...
 </PropertyGroup>

Post a Comment

Previous Post Next Post