Visual studio 2022 errors: HRESULT: 0x80040402

Herman Badenhorst 30 Reputation points
2024-06-09T03:17:01.4466667+00:00

I have installed Visual Studio 2022 Community edition.

I create a new project.

Select: Asp.net web application

Select: Folder path, etc.

Select: .net framework 4.8

Get the message: Exception from HRESULT: 0x80040402

Note: I have been using Visual Studio for years and I trust the product.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,220 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Emilio Ivan Medina Martinez 10 Reputation points
    2024-08-13T21:29:48.4433333+00:00

    Try using differents names for the main project, and the solution, when you are creating them. This worked for me.

    2 people found this answer helpful.

  2. Arjun P K 5 Reputation points
    2024-10-02T04:29:01.74+00:00

    I encountered the same error 'Exception from HRESULT: 0x80040402' when trying to create an ASP.NET Web Application (.NET Framework) project.

    I resolved this issue by unchecking the 'Place solution and project in the same directory' option.

    1 person found this answer helpful.
    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.