Error HRESULT E_FAIL has been returned from a call to a COM component in Asp.net MVC

43 Views Asked by At

I have a problem while creating the Asp.Net MVC project on visual studio 2022. Project is created with an error message.

Error HRESULT E_FAIL has been returned from a call to a COM component.

Project is opened but unable to build, build failed and pop up appear with message.

Build failed, Do you want to continue debugging.

Error Images are given bellow. Build Error Error Image

I have tried multiple mentioned solutions but failed to resolve the issue. Following are the solutions which I have tried but failed.

Solution 1:

  1. Close the VS.
  2. Delete the cash folder having name ProjectTemplatesCache and ComponentModelCache.
  3. Reset the Visual Studio Setting. Tools>Import and export settings>reset all settings

Solution 2:

  1. Close Visual Studio.
  2. Go to the project's root folder and delete the .vs directory.
  3. Start Visual Studio and open the solution.
  4. The build should now work.

Solution 3:

  1. Close Visual Studio.
  2. Start —> Run —> regsvr32 %SystemRoot%\System32\msxml3.dll
  3. Start —> Run —> regsvr32 %SystemRoot%\SysWOW64\msxml3.dll
  4. Open Visual Studio Project, it will work.

Solution 4:

  1. Close Visual Studio.
  2. Uninstall the visual studio and all its temp folders.
  3. Reboot the system.
  4. Reinstall the visual studio.
  5. Get same error, failed to resolve it.
0

There are 0 best solutions below