I have a problem with creating windows forms app by C# in visual studio

Ibrahim Ahmed 0 Reputation points
2023-04-25T15:36:21.3133333+00:00

When I try to create a windows forms app in C# in visual studio and the project opens, I don't find any files in the Solution Explorer. I doubted that something wrong happened when installing Visual Studio, so I reinstalled my Windows operating system and then visual studio, but the problem still exists.

I searched a lot but didn't find similar problems like this. I attached some helpful screenshots that also include the installed components.

Thanks in advance to those who will help me.

Note: At first, I tried to reinstall visual studio, then I reinstalled my Windows operating system and then visual studio, but the problem still exists. edited

problem

components

Developer technologies Windows Forms
Developer technologies Visual Studio Other
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-04-26T09:57:23.21+00:00

    Hi @Ibrahim Ahmed,

    Welcome to Microsoft Q&A! 

    Please check your System environment variables if there are two paths to dotnet.

    C:\Program Files\dotnet

    C:\Porgram Files (x86)\dotnet 

    If so, please delete this one: C:\Porgram Files (x86)\dotnet.

    Then, restart your computer and check if the project can be created normally. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.