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 5 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

Developer technologies Visual Studio Setup
Developer technologies Visual Studio Other
Developer technologies ASP.NET Other
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    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 5 Reputation points
    2024-06-14T19:49:20.3466667+00:00

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


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.