"The library 'hostpolicy.dll' required" if run from deploy folder, but emitEntryPoint is true
<p>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. </p>

<p>Now if I call <code>dotnet application.exe</code> in the console, I receive the following error:</p>

<blockquote>
  <p>A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found</p>
</blockquote>

<p>I have found in this <a href="https://stackoverflow.com/a/38085431/2833802">answer</a> and this <a href="https://github.com/dotnet/cli/issues/2859" rel="nofollow noreferrer">issue</a> on github, that the actual problem is a missing emitEntryPoint property. All is fine, except that my project.json already has <code>"emitEntryPoint": true</code></p>

<p>What else can cause this error?</p>