Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"The library 'hostpolicy.dll' required" if run from deploy folder, but emitEntryPoint is true

I created a Web API project using the default ASP.NET Core Web Application (.NET Framework) template and then published to local folder using VS.

Now if I call dotnet application.exe in the console, I receive the following error:

A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found

I have found in this answer and this issue on github, that the actual problem is a missing emitEntryPoint property. All is fine, except that my project.json already has "emitEntryPoint": true

What else can cause this error?

like image 484
Set Avatar asked Jul 12 '16 15:07

Set


1 Answers

Once you publish the application and have a .exe file, you don't need to use dotnet anymore. The application is compiled!

Just run application.exe by double-clicking it, or launching it from the console.

like image 69
Nate Barbettini Avatar answered Sep 24 '22 23:09

Nate Barbettini