When creating a project as an ASP. NET Web Application (. NET Framework) Empty, MVC in Visual Studio Community 2022 I get this error: Excepction from HRESULT: 0x80040402 I would like to know how to fix it please

ESTEBAN UGALDE 0 Reputation points
2024-06-08T03:23:05.2466667+00:00

When creating a project as an ASP. NET Web Application (. NET Framework) Empty, MVC in Visual Studio Community 2022 I get this error: Excepction from HRESULT: 0x80040402 I would like to know how to fix it please

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,396 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,821 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
999 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 28,941 Reputation points Microsoft Vendor
    2024-06-10T05:01:15.0466667+00:00

    Hello @ESTEBAN UGALDE,

    Welcome to Microsoft Q&A forum.

    Please try to/make sure that following workload and components have been installed:

    Workload

    => ASP.NET and web development

    Components

    => .NET Framework project and item templates

    => Additional project templates (previous versions)

    => .NET Framework 4.8.1 development tools

    Maybe this issue is caused by .NET Framework. I would suggest you also download and install .NET Framework 4.8/4.8.1 SDK from here: Download .NET Framework. If you have installed it, try to repair it by running the setup file of .NET Framework 4.8/4.8.1 => Repair.

    Besides, there's a similar issue here: Unable to make a Web Form Project with a template. If this error persists, kindly follow, add comments on that ticket and wait for any latest update.

    Sincerely,

    Tianyu


    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.


  2. ESTEBAN UGALDE 0 Reputation points
    2024-06-14T19:49:20.3466667+00:00

    I already solved it, there were some problems in the Windows registry editor