When I create a Windows Forms project (running on the .NET Framework), it works without problems.
But Windows Forms app doesn't work neither in .NET 6.0 nor in .NET 7.0.
In the end, there is always a solution with 0 project and it is not possible to add the project that you create there in the folders.
I am using VS 17.7.1
See this screenshot:
Try adding C:\Program Files\dotnet\
in System Environment Path.
I am able to reproduce your problem by removing the variable.