[GH-ISSUE #4] "The required library hostfxr.dll could not be found" #3

Closed
opened 2026-09-04 00:46:31 +02:00 by Stone_Red · 12 comments
Owner

Originally created by @KateReller on GitHub (May 31, 2021).
Original GitHub issue: https://github.com/Stone-Red-Code/DiscordCLI/issues/4

I extracted all of the files into a folder then ran DiscordCLI.exe in the terminal. Then this error comes up.
I'm on Arch Linux, and I have installed the dotnet-runtime package.

A fatal error occurred, the required library hostfxr.dll could not be found in [Z:\usr\share\dotnet\host\fxr\5.0.6]
0108:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
0108:fixme:advapi:ReportEventW (00000000CAFE4242,0x0001,0x0000,0x000003ff,0000000000000000,0x0001,0x00000000,000000000019FB80,0000000000000000): stub
0108:err:eventlog:ReportEventW L"Description: A .NET application failed.\nApplication: DiscordCLI.exe\nPath: Z:\\home\\kate\\Downloads\\discord\\DiscordCLI.exe\nMessage: A fatal error occurred, the required library hostfxr.dll could not be found in [Z:\\usr\\share\\dotnet\\host\\fxr\\5.0.6]\n\n"
0108:fixme:advapi:DeregisterEventSource (00000000CAFE4242) stub
Originally created by @KateReller on GitHub (May 31, 2021). Original GitHub issue: https://github.com/Stone-Red-Code/DiscordCLI/issues/4 I extracted all of the files into a folder then ran DiscordCLI.exe in the terminal. Then this error comes up. I'm on Arch Linux, and I have installed the `dotnet-runtime` package. ``` A fatal error occurred, the required library hostfxr.dll could not be found in [Z:\usr\share\dotnet\host\fxr\5.0.6] 0108:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub 0108:fixme:advapi:ReportEventW (00000000CAFE4242,0x0001,0x0000,0x000003ff,0000000000000000,0x0001,0x00000000,000000000019FB80,0000000000000000): stub 0108:err:eventlog:ReportEventW L"Description: A .NET application failed.\nApplication: DiscordCLI.exe\nPath: Z:\\home\\kate\\Downloads\\discord\\DiscordCLI.exe\nMessage: A fatal error occurred, the required library hostfxr.dll could not be found in [Z:\\usr\\share\\dotnet\\host\\fxr\\5.0.6]\n\n" 0108:fixme:advapi:DeregisterEventSource (00000000CAFE4242) stub ```
Stone_Red added the bug label 2026-09-04 00:46:31 +02:00
Author
Owner

@Stone-Red-Code commented on GitHub (May 31, 2021):

What's the output when you run the dotnet --version command?

<!-- gh-comment-id:851654076 --> @Stone-Red-Code commented on GitHub (May 31, 2021): What's the output when you run the `dotnet --version` command?
Author
Owner

@KateReller commented on GitHub (May 31, 2021):

Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
  * You intended to execute a .NET program:
      The application '--version' does not exist.
  * You intended to execute a .NET SDK command:
      It was not possible to find any installed .NET SDKs.
      Install a .NET SDK from:
        https://aka.ms/dotnet-download
<!-- gh-comment-id:851669505 --> @KateReller commented on GitHub (May 31, 2021): ``` Could not execute because the application was not found or a compatible .NET SDK is not installed. Possible reasons for this include: * You intended to execute a .NET program: The application '--version' does not exist. * You intended to execute a .NET SDK command: It was not possible to find any installed .NET SDKs. Install a .NET SDK from: https://aka.ms/dotnet-download ```
Author
Owner

@Stone-Red-Code commented on GitHub (May 31, 2021):

Oh. Can you try dotnet --list-runtimes?

<!-- gh-comment-id:851671217 --> @Stone-Red-Code commented on GitHub (May 31, 2021): Oh. Can you try `dotnet --list-runtimes`?
Author
Owner

@KateReller commented on GitHub (May 31, 2021):

Microsoft.NETCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

<!-- gh-comment-id:851671761 --> @KateReller commented on GitHub (May 31, 2021): `Microsoft.NETCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]`
Author
Owner

@Stone-Red-Code commented on GitHub (May 31, 2021):

Hmm looks fine. The older version of DiscordCLI still works right?

<!-- gh-comment-id:851672209 --> @Stone-Red-Code commented on GitHub (May 31, 2021): Hmm looks fine. The older version of `DiscordCLI` still works right?
Author
Owner

@KateReller commented on GitHub (May 31, 2021):

Version 0.3a works. Anything above does not.

<!-- gh-comment-id:851672574 --> @KateReller commented on GitHub (May 31, 2021): Version 0.3a works. Anything above does not.
Author
Owner

@Stone-Red-Code commented on GitHub (May 31, 2021):

Interesting. I'll look into it.
Thanks for your patience.

<!-- gh-comment-id:851679038 --> @Stone-Red-Code commented on GitHub (May 31, 2021): Interesting. I'll look into it. Thanks for your patience.
Author
Owner

@Stone-Red-Code commented on GitHub (May 31, 2021):

Another question: How do you start the app?

<!-- gh-comment-id:851682156 --> @Stone-Red-Code commented on GitHub (May 31, 2021): Another question: How do you start the app?
Author
Owner

@KateReller commented on GitHub (May 31, 2021):

By making the DiscordCLI.exe executable and doing ./DiscordCLI.exe in the terminal.
I'm pretty new to Linux in general so I could be doing things wrong.

<!-- gh-comment-id:851694708 --> @KateReller commented on GitHub (May 31, 2021): By making the DiscordCLI.exe executable and doing `./DiscordCLI.exe` in the terminal. I'm pretty new to Linux in general so I could be doing things wrong.
Author
Owner

@Stone-Red-Code commented on GitHub (May 31, 2021):

Wym by:

making the DiscordCLI.exe executable

and you can try: dotnet ./DiscordCLI.dll

<!-- gh-comment-id:851696264 --> @Stone-Red-Code commented on GitHub (May 31, 2021): Wym by: > making the DiscordCLI.exe executable and you can try: `dotnet ./DiscordCLI.dll`
Author
Owner

@KateReller commented on GitHub (May 31, 2021):

Doing chmod +x DiscordCLI.exe.
And doing dotnet ./DiscordCLI.dll works.

<!-- gh-comment-id:851698437 --> @KateReller commented on GitHub (May 31, 2021): Doing `chmod +x DiscordCLI.exe`. And doing `dotnet ./DiscordCLI.dll` works.
Author
Owner

@Stone-Red-Code commented on GitHub (May 31, 2021):

Ok nice. I think I'll add platform specific builds in the next release again so you don't have to start the app like that.

<!-- gh-comment-id:851698830 --> @Stone-Red-Code commented on GitHub (May 31, 2021): Ok nice. I think I'll add platform specific builds in the next release again so you don't have to start the app like that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Stone_Red/DiscordCLI#3