runtime is missing in global location
See original GitHub issueDescribe the bug
After installing httprepl, running $httprepl
or $dotnet httprepl
is failing.
To Reproduce
Install dotnet via brew and httprepl via $dotnet tool install -g Microsoft.dotnet-httprepl
.
Try running httprepl as described above.
Exceptions (if any)
$httprepl
A fatal error occurred. The required library libhostfxr.dylib could not be found.
If this is a self-contained application, that library should exist in [/Users/user/.dotnet/tools/.store/microsoft.dotnet-httprepl/6.0.0/microsoft.dotnet-httprepl/6.0.0/tools/net6.0/any/].
If this is a framework-dependent application, install the runtime in the global location [/usr/local/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet].
The .NET runtime can be found at:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=osx.12-x64&apphost_version=6.0.4
-
$dotnet httprepl
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-httprepl does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
$echo $PATH
/somevaild/.dotnet/tools /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/TeX/texbin
Further technical details
$dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.104
Commit: 915d644e45
Runtime Environment:
OS Name: Mac OS X
OS Version: 12.4
OS Platform: Darwin
RID: osx.12-x64
Base Path: /usr/local/Cellar/dotnet/6.0.104_1/libexec/sdk/6.0.104/
Host (useful for support):
Version: 6.0.4
Commit: be98e88c76
.NET SDKs installed:
6.0.104 [/usr/local/Cellar/dotnet/6.0.104_1/libexec/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.4 [/usr/local/Cellar/dotnet/6.0.104_1/libexec/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.4 [/usr/local/Cellar/dotnet/6.0.104_1/libexec/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created a year ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Microsoft Visual C++ 2022 X86 Minimum Runtime
Microsoft Visual C++ 2022 X86 Minimum Runtime - 14.32.31326 missing. I've been getting this for a while but the folder doesn't exist in...
Read more >A fatal error occurred. The required library hostfxr.dll could ...
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT ...
Read more >[java] New launcher has missing Java Runtime?
It seems like it was located in "C:\Users\{yourusernamehere}\AppData\Local\Packages\Microsoft.4297127D64EC6_8wekyb3d8bbwe\LocalCache\Local\ ...
Read more >Missing hostfxr.dll (.NET Core Runtime) When Creating a ...
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT ...
Read more >ArcGIS pro Requires Microsoft .NET Desktop Runtime (X64)
When updating ArcGIS Pro to version 3.0.0, the following error is returned: Error: ArcGIS Pro requires Microsoft .NET Desktop Runtime (x64).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This feels like something didn’t work correctly in the brew install of .NET. Per the
dotnet --info
the install is located in/usr/local/Cellar/dotnet/6.0.104_1/libexec
, but based on the errors it’s not registered. So apphost won’t be able to find it since it’s not on the default path nor is it registered.I don’t have a mac at hand to try this - to verify that brew is not doing the right thing here. @joeloff could you please check on this? I assume we don’t own the brew .NET package, right?
A workaround is either:
/etc/dotnet/install_location_x64
(that file should be a text file with just the path to the .NET install in it on the first line)DOTNET_ROOT
environment variable to the path of the .NET install.For those interested, details on how the install location works and what is used to find it are here: https://github.com/dotnet/designs/blob/main/accepted/2021/install-location-per-architecture.md
The Formula mentions this, but you need to set
DOTNET_ROOT
properly:export DOTNET_ROOT="$HOMEBREW_PREFIX/opt/dotnet/libexec"
Here’s the hosts.txt output without this for completeness: