C# application looking for runtime in wrong location

  • Thread starter Thread starter runnerpaul
  • Start date Start date
R

runnerpaul

Guest
I have the .NET SDK installed on my Windows laptop and am able to run a simple C# HelloWorld program. .Net is installed at C:\Program Files\dotnet and I also have that set in my PATH variable.

I'm now trying to run another C# application. It's run with an exe but all I can see is a cmd window quickly flash on the screen. The following error is in my Event Viewer:

Description: A .NET Core application failed.
Application: Cdi.FinancialCalculator.Api.exe
Path: C:\workspace\DataInsights\content\di.Calculator.Api.exe
Message: 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:\workspace\DataInsights\content\].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files (x86)\dotnet] or use the DOTNET_ROOT(x86) environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation].

The .NET Core runtime can be found at:
- Download .NET Core (Linux, macOS, and Windows)

It's like this application is looking for the .NET runtime in the wrong location. How do I resolve this?

Continue reading...
 
Back
Top