After updating to v17.9.3 Visual Studio IDE closes at start with error message [FIXED]
VS 2022 Community was running flawlessy for a month. Two days ago I was notified there was the update v17.9.3, so I launched it and left (I did a previous update some weeks ago with no troubles). When I was back the update was successful, VS told me that now I needed to log in with MS account so I tried but clicking the button didn't do anything! So I just had to clic "Ignore for now". The IDE started but I saw some upper left error messages about not found main IDE functionalities. Then a messagebox with the error "'VSPackage' not loaded correctly". Rebooting the IDE didn't help.
So I made a Visual Studio repair from its installer, but it didn't help.
Searching the Internet I found the first thing to do was looking for the .Net version, so I typed "dotnet --version" in the command prompt but I received this error: "Fatal error. Internal CLR error. (0x80131506)". This is shown with any parameter I launch the dotnet.exe file, but only the dotnet.exe located in "C:\Program Files\dotnet", launching it from "C:\Program Files (x86)\dotnet" and "C:\Program Files\Microsoft Visual Studio\2022\Community\dotnet\net8.0\runtime" it works. What concerns me is that the environment variable path uses the "C:\Program Files\dotnet" that doesn't work...
So I installed the .Net SDK 8.03 from here: https://dotnet.microsoft.com/en-us/download
But after this same error executing dotnet.exe: "Fatal error. Internal CLR error. (0x80131506)". By the way, I tried installing this package on a clean VM and same result, same error message!
And now the IDE only shows the splash screen and then closes with this message:
Microsoft.ServiceHub.Utility.HostCrashException:
Failed to start host 'dotnet.x64$IdentityHost'. Host exited with code '-1073741819' (ErrorKind: HostExited) (ErrorKind: HostExited HResult: 80131500)
I made the repairing other two times and uninstalled and reinstalled VS. Nothing helped.
The only thing now is to format and reinstall Windows.
19 Replies
OK, I removed everything, used the cleaner tool and installed the Enterprise demo. It worked! Or better, the IDE launches, but then I have the same upper left "internal error" messages, a messagebox with "'VSPackage' not loaded correctly" and after some seconds the IDE crashes.
I was able to run a console program and instead of the output I got the same error I mentioned when I run the dotnet.exe:
Fatal error. Internal CLR error. (0x80131506)
So everything depends on that error.
I have 3 dotnet.exe files on my drive, 2 work and 1 not:
C:\Program Files\dotnet\dotnet.exe --info >> Fatal error. Internal CLR error. (0x80131506)
C:\Program Files (x86)\dotnet\dotnet.exe --info >> OK - v8.03
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\dotnet\net8.0\runtime\dotnet.exe >> OK - v8.03
I tried to install the Microsoft SDK 8.03 in a clean VM with Win10 and got the same internal error.
Opening the "Deverloper Command Prompt for VS 2022" and executing dotnet.exe --info I get the same internal error.
Have you tried running dotnet --info outside of VS?
Yes, with a normal windows command prompt, same.
C:\Program Files\dotnet\dotnet.exe --info >> Fatal error. Internal CLR error. (0x80131506)
C:\Program Files (x86)\dotnet\dotnet.exe --info >> OK - v8.03
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\dotnet\net8.0\runtime\dotnet.exe >> OK - v8.03
When you say you removed everything you uninstalled VS and the .net SDK?
Yes, uninstalled VS, any. Net package and SDK. Then also run the cleaner tool.
That fatal/internal error running dotnet is concerning.
have you tried just installing the SDK afterwards and then running
dotnet --info
?After I got the first error in VS Community IDE I installed the SDK 8.03 manually to see if it fixed the issue, but not.
I mean without VS already installed
Weird and even more concerning thing is that installing the SDK 8.03 in a clean VM (Win10) I have the same error with dotnet.exe.
Yes, in the VM.
Same error.
In the VM I don't have VS installed, I used it just to try the SDK.
VS is on my main system (not virtual).
Can you do
dotnet --list-sdks
or dotnet --list-runtimes
?
And was it all working fine when you were on 8.0.2?I cannot launch dotnet with any parameter, even random chars, it gives error.
On previous version I had not idea of the existence of this tool and I only used VS. But console programmes worked properly, so I guess that dotnet worked too (otherwise I would have had the same error when running them).
I'm gonna try on another phisical PC (since even a clean VM reports the same error installing DotNet SDK 8.03).
Using the dotnet.exe in the VS installation folder (C:\Program Files\Microsoft Visual Studio\2022\Enterprise\dotnet\net8.0\runtime), it works and these are the results:
dotnet --list-sdks >> [no output]
dotnet --list-runtimes >> Microsoft.NETCore.App 8.0.3 [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\dotnet\net8.0\runtime\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.3 [C:\Program Files\Microsoft Visual Studio\2022\Enterprise\dotnet\net8.0\runtime\shared\Microsoft.WindowsDesktop.App]
Have you tried the fix from the other thread to see if that works for you?
Not yet because I don't get if I just have to type that command or doing other stuff...
But I installed the SDK 7.0 and it works, even if VS tells me that my console program need an update of the SDK to work and then VS closes again.
I'm gonna reinstalling the SDK 8 and trying the PowerShell command...
Now I tried and the response of the script was:
Everything seems fine as we could not find a match in PATH for 'C:\Program Files (x86)\dotnet' ... which is fine Write-Host ***
Why does it search for the 32 bit version?
I tried the 9.0 pre-release of the SDK and now the command reports:
Fatal error. System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at System.Buffers.SearchValues.TryGetSingleRange[[System.Char, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.ReadOnlySpan
1<Char>, Char ByRef, Char ByRef)
at System.Buffers.SearchValues.Create(System.ReadOnlySpan
1<Char>)
at System.Globalization.CompareInfo..cctor()
at System.String.Equals(System.String, System.StringComparison)
at Microsoft.DotNet.Cli.Utils.UILanguageOverride.Setup()
at Microsoft.DotNet.Cli.Program.Main(System.String[])It searches for the 32 bit version because a common issue is that people have both 32 bit and 64 bit installed, with the 32 bit version listed higher up on their PATH
Which then prioritises the 32 bit version when using dotnet commands, causing issues
I wouldn't recommend jumping to the net9 sdk, as it's in preview
At this point I'd probably say clean it all out again, get rid of any installed sdks you have, 32 and 64 bit, then just install the net8 64 bit sdk
OK. I tried VS 2022 Community v17.9.3 on my laptop and it woked, even the installer .Net SDK v8.0.3 works and so the dotnet command.
It's just my Win11 machine and, oddly, a clean VM with Win10 installed on it...
Maybe I try with a Win11 inplace reinstall too, what do you think?
Not sure myself really, sounds like it's something to do with your machine
Yeah, maybe... I removed every .Net SDK package, VS and other related things, then installed Win11 23H2 and reinstalled VS2022 CE 17.9.3. Nothing changed...
The last resort is to format and reinstall Windows from scratch.
My machine is quite old (15 yo - CPU Intel CoreDuo Quad Q9550 @ 2.8 GHz - 8 GB RAM) and I installed Win11 skipping the requirements with some tricks. Could it be this the cause?
Version 7.0.17 works...
VS 2022 17.6 works...
Pro, because I cannot find an older Community 2022 version.
OK, I find the fix for .Net 8.03 and VS 2022 Community Edition v17.9.3.
I was not the only one having this issue, it seems something going wrong with 8.0.3 version. The fix is described here: https://stackoverflow.com/questions/78175061/visual-studio-2022-error-after-updating-to-17-9-3-hostcrashexception-failed-t/78183392#78183392 I report the solutions here for semplicity: * Step 1: Downloading .NET Core version 8.0.2 Binaries from link below: https://versionsof.net/core/8.0/8.0.2/ * Step 2: Navigate to path below(replace the path with your current vs path): 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 that archive at step 3 to "8.0.3" Now try opening the Visual studio again and check if its working. I just had to replace the "8.0.3" folder with the renamed "8.0.2" (taken from the archive mentioned in the link ) in both the following path: * C:\Program Files\Microsoft Visual Studio\2022\Community\dotnet\net8.0\runtime\shared\Microsoft.NETCore.App * C:\Program Files\dotnet\shared\Microsoft.NETCore.App If anyone have some issues, be sure to change the folder in both this path. Now let's have more fun with VS .Net and C#! 🙂
I was not the only one having this issue, it seems something going wrong with 8.0.3 version. The fix is described here: https://stackoverflow.com/questions/78175061/visual-studio-2022-error-after-updating-to-17-9-3-hostcrashexception-failed-t/78183392#78183392 I report the solutions here for semplicity: * Step 1: Downloading .NET Core version 8.0.2 Binaries from link below: https://versionsof.net/core/8.0/8.0.2/ * Step 2: Navigate to path below(replace the path with your current vs path): 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 that archive at step 3 to "8.0.3" Now try opening the Visual studio again and check if its working. I just had to replace the "8.0.3" folder with the renamed "8.0.2" (taken from the archive mentioned in the link ) in both the following path: * C:\Program Files\Microsoft Visual Studio\2022\Community\dotnet\net8.0\runtime\shared\Microsoft.NETCore.App * C:\Program Files\dotnet\shared\Microsoft.NETCore.App If anyone have some issues, be sure to change the folder in both this path. Now let's have more fun with VS .Net and C#! 🙂
Versions of .NET
.NET Core 8.0.2 - Versions of .NET
Release 8.0.2 of .NET Core, released on 2024-02-13. versionsof.net gives an overview of all releases and versions of .NET Core.
Stack Overflow
Visual Studio 2022 error after updating to 17.9.3 : HostCrashExcept...
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$