.Net application aborts at startup with "Failed to create CoreCLR, HRESULT: 0x80004005" on windows server - when upgrade .Net5 to .Net 6
Asked Answered
N

0

1

I' v decided to upgrade a project from .net5 to .net6. After upgrade when I publish and then deploy through CI/CD server (a GitLab runner) that contains .net6 runtime, the production server that installed windows server 2019 datacenter couldn't run the project and aborts at startup with "Failed to create CoreCLR, HRESULT: 0x80004005".

I read these issues https://github.com/dotnet/runtime/issues/3168 , https://github.com/dotnet/runtime/issues/70758 but I couldn't find useful guide. Also I opened a new issue.

But when I publish on my pc that contains .net6 runtime too, then copy to the same machine(windows server), application runs without any error. In next step I want to reinstall .NET runtime on ci/cd server maybe this could fix problem and I can publish through CI/CD server too.

Nalor answered 22/6, 2023 at 21:1 Comment(3)
github.com/dotnet/runtime/blob/main/docs/design/features/…Tolland
I also enabled tracing setting COREHOST_TRACE=1 env. variable. and after setting get the same error and no more information. @HansPassantNalor
The consistent explanation for this error that I see is relevant to self-contained deployment of a .net app. Important details missing from the question btw. Such an app starts running by first having to create the runtime files embedded in the .exe file. If that fails then it bombs like this. With the typical cause that the app does not have write access to the temp directory.Tolland

© 2022 - 2024 — McMap. All rights reserved.