Issue creating ASP.NET Core web application in Visual Studio 2022

sahar rst 10 Reputation points
2023-02-18T15:14:52.12+00:00

I'm having trouble creating a new ASP.NET Core web application project in Visual Studio 2022. I've tried creating a new project using the built-in templates, but when I do so, nothing appears in the solution that was created, even though the project appears to be loaded in the Solution Explorer.

I've tried resetting the Visual Studio settings, repairing the installation of Visual Studio, and installing the latest updates for Visual Studio, but none of these solutions have worked.

I suspect that the issue may be related to the fact that I changed the default root for installing Visual Studio. However, I'm not sure how to verify this or how to fix the problem if it is indeed the cause.

Can anyone provide any guidance or advice on how to resolve this issue? I would greatly appreciate any help or suggestions.

Thanks in advance!

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,237 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,690 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 26,566 Reputation points Microsoft Vendor
    2023-02-20T09:40:38.93+00:00

    Hi @sahar rst

    Welcome to Microsoft Q&A! 

    Do you mean that the solution with 0 projects is displayed in Solution Explorer?

    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 loaded normally.

    If it doesn't work, please share us some screenshots so that we can investigate it further.

    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.

    1 person found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more