Core: fail to load `hostfxr.dll`

Created on 11 Apr 2020  ·  6Comments  ·  Source: dotnet/core

Issue Title

using vscode debuging dotnetcore project

# General

You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software

to help you develop and test your applications.

Failed to load the dll from [c:\Users\heart\AppData\Roaming\Code\User\globalStorage\ms-vsliveshare.vsliveshare\dotnet-3.1.1\host\fxr\3.1.1\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from c:\Users\heart\AppData\Roaming\Code\User\globalStorage\ms-vsliveshare.vsliveshare\dotnet-3.1.1\host\fxr\3.1.1\hostfxr.dll failed

  • Installing .NET Core prerequisites might help resolve this problem.
    https://go.microsoft.com/fwlink/?linkid=798306
    目标进程已退出,但未引发 CoreCLR 启动事件。请确保将目标进程配置为使用 .NET Core。如果目标进程未运行 .NET Core,则发生这种情况并不意外。
    程序“[4732] xxxxxx..exe”已退出,代码为 -2147450750 (0x80008082)。
area-setup

Most helpful comment

I disabled the Live Share extension and reloaded and the debugger works now...

All 6 comments

What version of Windows are you running @heartacker? You might have to install some additional dependencies depending on your version: https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?tabs=netcore31&pivots=os-windows#windows-7--vista--81--server-2008-r2

What version of Windows are you running @heartacker? You might have to install some additional dependencies depending on your version: https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?tabs=netcore31&pivots=os-windows#windows-7--vista--81--server-2008-r2

hi, i am using windows 10 version 2004(build 19041.173)

I just started getting this, as well.

It _was_ working just fine. Not sure when it stopped working.

OS: Microsoft Windows 10 Pro
Version: 10.0.18363 Build 18363

I am facing the same issue. It seems to be randomly come and go.

I am using Windows 10 Pro 1903 Build 18362.778

The path for hostfxr.dll is the same except for the Windows username.

Same! And reinstalling and/or updating the SDK version doesn't help.

Windows 10 Pro 1909
Visual Studio Code 1.44.2
.NET Core SDK 3.1.101

You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software
to help you develop and test your applications.
-------------------------------------------------------------------
Failed to load the dll from [c:\Users\anthony\AppData\Roaming\Code\User\globalStorage\ms-vsliveshare.vsliveshare\dotnet-3.1.1\host\fxr\3.1.1\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from c:\Users\anthony\AppData\Roaming\Code\User\globalStorage\ms-vsliveshare.vsliveshare\dotnet-3.1.1\host\fxr\3.1.1\hostfxr.dll failed
  - Installing .NET Core prerequisites might help resolve this problem.
     http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program '[28676] testhost.exe' has exited with code -2147450750 (0x80008082).

I disabled the Live Share extension and reloaded and the debugger works now...

Was this page helpful?
0 / 5 - 0 ratings