.net core project dotnet publish - r after Windows 7 - x64. Exe open show ‘Failed to initialize CoreCLR, HRESULT: 0x80004005’
@wshuai222333 might be worth trying this mentioned here: https://github.com/dotnet/coreclr/issues/13395 I've just had a similar problem running on unbuntu, and following the advice got me past the problem.
You can switch the the portable RID's (win-x64, linux-x64, etc) which is the model we are moving towards.
You can directly reference the 2.0.0 version of Microsoft.NETCore.Runtime.CoreCLR package to upgrade the 1.0.2 reference you are getting pulled in and everything will work as expected
@graemefoster Thanks for you Enthusiasm. Do you mean Microsoft.NETCore.Runtime.CoreCLR Upgrade to 2.0.0?
I have similar problem when publish with Runtime ubuntu.16.04-x64.
I think the problem is about System.Private.CoreLib.dll. If I change manually only this dll with the linux-x64 dll, it works.
dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.400
Commit: 8642e60a0f
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.400\
Host (useful for support):
Version: 2.1.2
Commit: 811c3ce6c0
.NET Core SDKs installed:
2.1.302 [C:\Program Files\dotnet\sdk]
2.1.400 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
This is strace
lstat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
28622 lstat("/home/privateName", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
28622 lstat("/home/privateName/test", {st_mode=S_IFDIR|0775, st_size=24576, ...}) = 0
28622 stat("/home/privateName/test/System.Private.CoreLib.dll", {st_mode=S_IFREG|0664, st_size=2177536, ...}) = 0
28622 open("/home/privateName/test/System.Private.CoreLib.dll", O_RDONLY) = 10
28622 fcntl(10, F_SETFD, FD_CLOEXEC) = 0
28622 fstat(10, {st_mode=S_IFREG|0664, st_size=2177536, ...}) = 0
28622 fcntl(10, F_DUPFD_CLOEXEC, 0) = 11
28622 fstat(11, {st_mode=S_IFREG|0664, st_size=2177536, ...}) = 0
28622 mmap(NULL, 2177536, PROT_READ, MAP_SHARED, 11, 0) = 0x7f29147e9000
28622 mprotect(0x7f289f260000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f250000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f256000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f590000, 192512, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5c0000, 12288, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5c3000, 12288, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f257000, 12288, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f25a000, 12288, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5c6000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5c7000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5c8000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5c9000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5ca000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5cb000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5cc000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5cd000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5ce000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5cf000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5d0000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5d1000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5d2000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f263000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5d3000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5e0000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5e0000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
28622 mprotect(0x7f289f5d4000, 8192, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f660000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f661000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5e1000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5e1000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
28622 mprotect(0x7f289f5d6000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f662000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f663000, 4096, PROT_READ|PROT_WRITE) = 0
28622 mprotect(0x7f289f5d7000, 4096, PROT_READ|PROT_WRITE) = 0
28622 write(2, "Failed to initialize CoreCLR, HR"..., 49) = 49
28622 write(2, "\n", 1) = 1
28630 futex(0xe7b7a4, FUTEX_WAIT_BITSET_PRIVATE, 1, {1565364, 237259000}, ffffffff
28622 munmap(0x7f2919638000, 2807904) = 0
28622 munmap(0x7f29198e6000, 2783048) = 0
28622 unlink("/tmp/clr-debug-pipe-28622-156536208-in") = 0
28622 unlink("/tmp/clr-debug-pipe-28622-156536208-out") = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
28622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
28622 exit_group(-2147450743) = ?
28629 +++ exited with 137 +++
The version of System.Private.CoreLib.dll 4.6.24214.01. Commit Hash: abbb8f685929c7aeaa087dae46fedc1bc2af4b17
Can help me? Are there other solution more then "linux-x64" or "ubuntu-x64"?
Thanks
I'm having the similar issue. Trying to use hangfire.core. It works fine on Windows but when deploying and running ubuntu, it gives error- Failed to initialize CoreCLR, HRESULT: 0x80004005
I'm sure it's not an issue with versioning because if i remove hangfire and deploys, it works like charm.
I'm using postgres for hangfire storage.
Anybody found any solution?
Thanks
Banika
Same issue as above for me on Windows Server 2016. Targeting .net core 2.0.
On local Win10 it works, on Server 2016 it doesn't work. When I uninstall Hangfire and deploy app it works.
One note I had to install System.Net.NameResolution, for my project to be buildable by dotnet cli.
Regards,
Damian
Reference to the Microsoft.NETCore.Portable.Compatibility package removed in the latest betas after moving the project to use new SDKs. Also, explicit netstandard2.0 target was added to remove the reference burden so everything should be working fine now.
Hello we have the same issue in 1.6.23
:(
thank you in advance
kind regards
Remi
It's fixed in latest 1.7.0 pre-release versions, try updating to 1.7.0-rc1.
Hello, thank you ! it seems to works :)
!! we love hangfire
Most helpful comment
Hello, thank you ! it seems to works :)
!! we love hangfire