How to fix visual studio catastrophic failure in SolutionBuildManager.cs

Just suddenly the visual studio is not able to save the changes to some of my files. And is just reporting following, if I try to compile the code:

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) [HrBeginSlnUpdate @ SolutionBuildManager.cs:4450]
User's image

And if I try to close the visual studio:
Error HRESULT E_FAIL has been returned from a call to a COM component.

User's image

My visual studio version is:
Microsoft Visual Studio Professional 2022 (64-bit) – Current

Version 17.12.3

Read more here: Source link