C
C#3mo ago
Silver Black

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.
No description
19 Replies
Silver Black
Silver Black3mo ago
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.
SinFluxx
SinFluxx3mo ago
Have you tried running dotnet --info outside of VS?
Silver Black
Silver Black3mo ago
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
SinFluxx
SinFluxx3mo ago
When you say you removed everything you uninstalled VS and the .net SDK?
Silver Black
Silver Black3mo ago
Yes, uninstalled VS, any. Net package and SDK. Then also run the cleaner tool. That fatal/internal error running dotnet is concerning.
SinFluxx
SinFluxx3mo ago
have you tried just installing the SDK afterwards and then running dotnet --info?
Silver Black
Silver Black3mo ago
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.
SinFluxx
SinFluxx3mo ago
I mean without VS already installed
Silver Black
Silver Black3mo ago
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).
Silver Black
Silver Black3mo ago
No description
SinFluxx
SinFluxx3mo ago
Can you do dotnet --list-sdks or dotnet --list-runtimes? And was it all working fine when you were on 8.0.2?
Silver Black
Silver Black3mo ago
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]
SinFluxx
SinFluxx3mo ago
Have you tried the fix from the other thread to see if that works for you?
Silver Black
Silver Black3mo ago
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.ReadOnlySpan1<Char>, Char ByRef, Char ByRef) at System.Buffers.SearchValues.Create(System.ReadOnlySpan1<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[])
SinFluxx
SinFluxx3mo ago
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
Silver Black
Silver Black3mo ago
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?
SinFluxx
SinFluxx3mo ago
Not sure myself really, sounds like it's something to do with your machine
Silver Black
Silver Black3mo ago
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.
Silver Black
Silver Black3mo ago
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#! 🙂
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$
Want results from more Discord servers?
Add your server
More Posts
Docker container hosting dotnet 6 api on port 80 instead of mentioned portDocker hosting dotnet 6 api on port 80. Attached is the images of docker compose,dockerfile,appsetti✅ Looking for experienced dev to do a quick live code reviewHello, is there any experienced dev here interested in doing a live code review with me to review mysimple calculatori want to code an simple calculator and i want if i type an anything than number console says enter Pagination with C# (DotNet) + Angular problem.Hey gyus first of all thanks for anyone who gonna help me 🙂 I tried to implement pagination with c#✅ Anyone recommend a book, or online course?Hey guys, anyone have a book or video course they'd recommend for learning asp.net mvc and blazor? I✅ Need help with recursive solution on vjudge Homer Simpson UVA - 10465 problem with CI am trying to solve https://vjudge.net/problem/UVA-10465 or at least get "Time exceeded" (3000ms) iOpen Closed Principle confusionIn the case of some logic involving a class. Eg. There maybe an Account class and we calculate the i✅ How do I replace each character with a character that corresponds to the standard English layout?There is a string with the characters "ЙЦУКЕН". It corresponds to the "QWERTY" string of the standar✅ Using Options pattern in MAUII'm trying to squeeze some Options pattern config into my MAUI app, in `MauiProgram`, like this: ```✅ JWT questionI can generate a token fine. However when I use the token, it refuses to work. If anyone is kind eno