question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot Find hostfxr.dll

See original GitHub issue

Not completely sure if related to this action, but my best guess the issue is related to https://github.com/actions/setup-dotnet/pull/12#issuecomment-519660629.

Using: actions/setup-dotnet@v1.1.0
Run wyam
  wyam
   shell: C:\Program Files\PowerShell\6\pwsh.EXE -command ". '{0}'"
  env:
    DOTNET_ROOT: C:\hostedtoolcache\windows\dncs
A fatal error occurred, the required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in [C:\Users\runneradmin\.dotnet\tools\.store\wyam.tool\2.2.4\wyam.tool\2.2.4\tools\netcoreapp2.1\any\].
If this is a framework-dependent application, install the runtime in the default location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Silvengacommented, Sep 2, 2019

Thanks for the confirmation @biom3tric - I feel like the default should have worked as this change was made - https://github.com/actions/setup-dotnet/pull/12/commits/ff36c3f74808c58fe86e008c9df007eb630ffbf6 (updated DOTNET_ROOT to be /opt/hostedtoolcache/dncs/ instead of /opt/hostedtoolcache/dncs/version/arch/).

@damccorm it seems we need to be pointing to the versioned folder - the cli for 2.1 and 2.2 sdk’s don’t know how to resolve the correct version.

2reactions
ghostcommented, Sep 1, 2019

Using v1.1.0, i had to do this to make global tools work

export PATH="$PATH:$HOME/.dotnet/tools"
export DOTNET_ROOT=$DOTNET_ROOT/2.2.401/x64/

The default DOTNET_ROOT variable stops to /opt/hostedtoolcache/dncs/, instead of going into the version and x64 folder

Read more comments on GitHub >

github_iconTop Results From Across the Web

A fatal error occurred. The required library hostfxr.dll could ...
The required library hostfxr.dll could not be found. If this is a self-contained application, that library should exist in [C:\fakepath\].
Read more >
Resolved: The required library hostfxr.dll could not be found
Issue resolution for" A fatal error occurred. The required library hostfxr.dll could not be found" with and without installing.NET Core.
Read more >
hostfxr.dll free download
Download hostfxr.dll free! Fix DLL missing error. Solve it yourself or get help using DLL‑files.com Client to fix DLL error automatically.
Read more >
Failed to load the dll: hostfxr.dll - Microsoft Q&A
The library hostfxr.dll was found, but loading it from C:\Program Files ...
Read more >
Can't open UE5 demo - "The required library hostfxr.dll ...
Hi all, First, I got a message that the demo level couldn't be opened with the current version of UE, so it made...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found