c# – Windows Forms App (.NET) does not show up as an option in Visual Studio 2022


Check the Visual Studio installer. There are many versions of .NET, and for Windows specific development like the old Windows Forms you need some options checked.

enter image description hereClick “modify”.

Then if you select the workload shown “.NET desktop development”, you should be good to go.

enter image description here

Under the hood, it will probably install the old .NET *Framework* (4.8) SDK, among other stuff.

In the new project templates, you’ll find it under “C# / Windows / Desktop” :

enter image description here

For completeness, see which individual components I have installed, I can create new windows forms with both .NET Framework 4.8 or with modern .NET 8 or .NET 9.

enter image description here

Here is the .csproj (I can open it directly in VS):

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net8.0-windows</TargetFramework>
    <Nullable>enable</Nullable>
    <UseWindowsForms>true</UseWindowsForms>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

</Project>

Leave a Reply

Your email address will not be published. Required fields are marked *