I recently updated Visual Studio 2022 (Community) to version 17.9.3, and now it no longer runs, I get this error:
Microsoft.ServiceHub.Utility.HostCrashException:
Failed to start host 'dotnet.x64$IdentityHost'. Host exited with code '-1073741819' (ErrorKind: HostExited) (ErrorKind: HostExited HResult: 80131500)
My OS: Windows 10
I tried multiple solutions recommended in both official and unofficial threads, like updating the .NET version, repairing VS, turning off antivirus, launching VS with custom commands, deleting VS ComponentModelCache etc.., no chance!
Some solutions helped to open the IDE,but just more errors came up, indicating that "Feature '...' is currently unavailable due to an internal error." and then IDE crash happened.
Also installing the preview version didn't help too,it just gave me another error AFTER opening VS indicating that the Microsoft.VisualStudio.Shell.Connected.UserInformation.UserInformation
package did not load correctly(causing crashes)
this is the solution that worked for me but before explaining it i would say this method worked for v2022 17.9.3 - Community edition, but this workflow may work in future versions too
(The original source of the method below is here)
Step 1:
Download .NET Core version 8.0.2 Runtime Binaries from the link below:
https://versionsof.net/core/8.0/8.0.2/
Step 2:
Navigate to this path (update the path with your current VS path if needed):
C:\Program Files\Microsoft Visual Studio\2022\Community\dotnet\net8.0\runtime\shared\Microsoft.NETCore.App
there is a folder with name 8.0.3
rename that folder to something else, like _8.0.3
(to hold it as a backup of the original one)
Step 3:
open the downloaded archive,extract the folder shared\Microsoft.NETCore.App\8.0.2
from it and place it to the path mentioned in step 2
Step 4:
Rename the folder you got from tht archive at step 3 to 8.0.3
now try openning the Visual studio again and check if its working
Tip: Accourding to SilverBlacks answer in current topic, there is another path that contains dotent (like the path in step 2):
C:\Program Files\dotnet\shared\Microsoft.NETCore.App
you can do the step 2,3,4 in that path too.
if you had the error "Fatal error. Internal CLR error"
while using dotnet command in cmd or running project with Visual Studio Code (not Visual studio) , i highly recommend to try this because it may fix it.
Note 1:
Again, this solution worked for this specific version,if you face the similar problem in future versions,you may need to do the same thing but with different dotnet versions to fix it.
Note 2:
The source topic introduced a second solution,but to do the second method you must be able to open the VS for at least some seconds because changing something in options is needed.
Note 3:
If the mentioned way didn't help you,downloading an older version of VS like 2019 , might be a useful temporary solution,because obviusly this error came up in new version and older versions might work.