The library hostfxr.dll was found, but loading it from ...... failed? It runs in Visual Studio but failed in published folder

-1

I publish a Blazor (server-side) application as self-contained in a folder C:\......\bin\Release\netcoreapp3.1\publish\.

However, running MyApp.exe got the following error?

Failed to load the dll from [C:\......\bin\Release\netcoreapp3.1\publish\hostfxr.dll], HRESULT: 0x800700C1
The library hostfxr.dll was found, but loading it from C:\......\bin\Release\netcoreapp3.1\publish\hostfxr.dll failed
  - Installing .NET Core prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=798306

I did the same for another similar blazor application and it works. I'm using Visual Studio 2019 Version 16.4.6/.Net 3.1.

Update:

It runs inside Visual Studio (as Kestrel application) without any error.

asp.net
asp.net-core
blazor
blazor-server-side
asked on Stack Overflow Mar 25, 2020 by ca9163d9 • edited Mar 25, 2020 by ca9163d9

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0