runtime: dotnet --version leads to Failed to create CoreCLR, HRESULT: 0x80004005
Description
Whenever I run dotnet --version
I get Failed to create CoreCLR, HRESULT: 0x80004005
. I’m not sure what is causing it.
When I run dotnet --info
I get this:
G:\>dotnet --info
Failed to create CoreCLR, HRESULT: 0x80004005
Host (useful for support):
Version: 6.0.0
Commit: 4822e3c3aa
.NET SDKs installed:
6.0.100 [G:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.0 [G:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.0 [G:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.0 [G:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Enabling COREHOST_TRACE yields this: https://pastebin.com/aM6hZQFA
Reproduction Steps
run dotnet --version
Expected behavior
It outputs the SDK version, 6.0.100
Actual behavior
Failed to create CoreCLR, HRESULT: 0x80004005
Regression?
No response
Known Workarounds
No response
Configuration
I’m running this in a CMD on a Windows 7 64 bit machine.
Other information
I’ve tried reinstalling .NET 6 SDK and Desktop runtime, among deleting the dotnet folder too. I’ve also restarted my computer. Not sure how else to go about debugging this?
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 25 (14 by maintainers)
Why do you have these two env variables set?
These variables configure custom GC implementation. There is no custom GC in your environment - attempt to load clrgc.dll is failing as you can tell from the log that you have shared (
CreateFile G:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.16\clrgc.dll NAME NOT FOUND
).Clearing these env variables is likely going to fix the problem.