First off, for proof the following works, the following Visual Studio Solution was created in VS2019, runs fine. As a side note I have samples for DateOnly and TimeOnly struct and a few other goodies.
Under Options, Environment, Preview Features set Use previews of the .NET SDK
to true, restart Visual Studio.
Restart, in a Visual Studio solution create a new Windows Form app.
To validate double click the project file in Solution Explorer and you should see
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
</Project>
Or create via PowerShell at the root folder of a Visual Studio solution
dotnet new winforms --name WinApp1 --output WinApp1
dotnet sln add .\WinApp1\WinApp1.csproj