Trouble creating executable

When trying to create a Windows Forms executable in VS 2022 with PowerShell Pro Tools I get the following message -
C:\Program Files\dotnet\sdk\7.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(146,5): error NETSDK1136: The target platform must be set to Windows (usually by including ‘-windows’ in the TargetFramework property) when using Windows Forms or WPF, or referencing projects or packages that do so. [C:\Users\russ_\AppData\Local\Temp\8ee80030b4bb4326bc4f1454e52696f1\MADDg.csproj]
0 Warning(s)
1 Error(s)

Any idea what I need to do?

I don’t think it should have let you select both Windows PowerShell and net6.0. If you want Windows PowerShell, try a .net framework in the .net version instead, or you can use .net cores if you pick a PowerShell Core like PowerShell 7.