Building C++ project in 5.1 gives: Failed to create CoreCLR, HRESULT: 0x80004005

Hello! does anybody encountered this Failed to create CoreCLR, HRESULT: 0x80004005 while building a C++ project?

It works perfectly in 5.0, but whenever I switch to 5.1, I can’t even create any / generate(by using the right-click generate visual studio files) any C++ projects.

This error wouldn’t occur when I create a blueprint project, the project creates successfully. Thus I suspect it as a dotnet problem not an unreal problem…
I tried reinstalling SDKs & Runtimes of dotnet, validated unreal engine 5.1, but with no success.
I have searched online and I’m still confused what I should do, as I don’t see much people having this problem in the first place.

For some background, I have Visual Studio Community 2022, this problem occurred only in 5.1, but not in 5.0 of unreal, I followed the steps in Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.1 Documentation, make sure that my installed components are correct, unsurprisingly it still didn’t work.

Been having this problem for days, any help is really appreciated! Thanks!

1 Like