Efcore: hostfxr.dll was found, but loading it from [hostfxr.dll path] failed

Created on 8 Jul 2019  路  5Comments  路  Source: dotnet/efcore

Trying to run the test cases in the source code (EFCore.Tests), but this error always occurs:

[7/8/2019 9:33:42 AM Error] Testhost process exited with error: Failed to load the dll from [C:\Users\Daniel Li\source\repos\EntityFrameworkCore.dotnethost\fxr\3.0.0-preview8-27905-07hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\Users\Daniel Li\source\repos\EntityFrameworkCore.dotnethost\fxr\3.0.0-preview8-27905-07hostfxr.dll failed

However, I think I have all the prerequisites installed:

Further technical details

OS Name: Microsoft Windows 10 Enterprise
IDE: Visual Studio Community 2019 Version 16.1.5
Microsoft .NET Framework Version 4.7.03056
.NET Core 3.0.100-preview6-012264 (in C:\Program Files\dotnet\sdk)

I can't seem to view the SDK version and runtime version with "dotnet --info", I get a similar output:

dotnet : Failed to load the dll from [C:\Users\Daniel Li\source\repos\EntityFrameworkCore.dotnethost\fxr\3.0.0-preview8-27905-07hostfxr.dll], HRESULT: 0x800700C1
At line:1 char:1

  • dotnet --info
  • ~~~~~

    • CategoryInfo : NotSpecified: (Failed to load ...ULT: 0x800700C1:String) [], RemoteException

    • FullyQualifiedErrorId : NativeCommandError

The library hostfxr.dll was found, but loading it from C:\Users\Daniel Li\source\repos\EntityFrameworkCore.dotnethost\fxr\3.0.0-preview8-27905-07hostfxr.dll failed

closed-question customer-reported

All 5 comments

@daniel-li-djl87 Are you running build from the command line?

Note from triage: try on a clean machine.

Yes, I ran the build command and followed the instructions from: https://github.com/aspnet/EntityFrameworkCore/wiki/getting-and-building-the-code

@daniel-li-djl87 I'll try it on a clean machine in the coming days and see if I can reproduce.

@daniel-li-djl87 I tried on a clean machine and didn't run into any issues. I updated https://github.com/aspnet/EntityFrameworkCore/wiki/Getting-and-Building-the-Code to make a few things clearer. I tested with 16.1.5 Community Edition, with the "ASP.NET and web development" workload.

Some things to make sure of:

  • build on the command line is working
  • You are using startvs to open the Visual Studio solution

Thanks! I tried on a clean machine and I was able to get it to work.

Was this page helpful?
0 / 5 - 0 ratings