Search code examples
c#windowsvisual-studiodesktop

Error create project windows form app in Visual Studio 2022


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:

https://pasteboard.co/gSCqZeyFtwCY.gif

.NET SDK 6 and 7 installed Installed

Working 👏 enter image description here


Solution

  • Try adding C:\Program Files\dotnet\ in System Environment Path.

    I am able to reproduce your problem by removing the variable.