profile
viewpoint

Ask questionsThe library 'hostpolicy.dll' required to execute the application was not found

I'm getting this error any time I try to run an asp.net core 2.1.0-preview1-final mvc app installed with the installer.

A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\2.1.0-preview1-final'.

Steps to reproduce: dotnet new mvc dotnet build dotnet run

I'm using Windows 7

If I do the same thing with the binaries in a separate install directory (instead of the installer) it seems to work fine. However when I merged the binaries into my normal dotnet install directory it stopped working again.

Uninstalling all of my sdks and reinstalling 2.1.0-preview1 got it working

aspnet/AspNetCore

Answer questions Sergio1C

Hi from 2019 ....I was get similar error output, but i've get first error as:

rzc generate exited with code -2147450749.

I tryed investigate this issue self and solve this issue:

  1. open cmd and build project (in your project path) by command "dotnet build"
  2. it show again output error. In my case it was the library 'hostpolicy.dll' required to execute the application was not found in C:\Programm files\dotnet\shared\Microsoft.NetCore.App\2.0.9. I just check all me install list SDK& Runtime verisons list and delete this path manually.
  3. try build again...build is done.

Hope this info get help somebody.

useful!

Related questions

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies hot 123
The SPA default page middleware could not return the default page '/index.html' in production application hot 102
The SPA default page middleware could not return the default page '/index.html' in production application hot 96
Asp.Net MVC Core: “Error unprotecting the session cookie” exception hot 79
No DefaultChallengeScheme found from preview8 to preview9 hot 67
BadHttpRequestException: Reading the request body timed out due to data arriving too slowly hot 65
Method not found: 'Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder`1.HasIndex(System.Linq.Expressions.Expression`1<System.Func`2<System.__Canon,System.Object>>)'. hot 59
error CS1503: Argument 2: cannot convert from 'method group' to 'EventCallback' hot 57
Error: Invocation canceled due to the underlying connection being closed. hot 54
Unexpected end of request content k8s pod - AspNetCore hot 53
Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing. To continue using 'UseMvc', please set 'MvcOptions.EnableEndpointRounting = false' inside 'ConfigureServices'. hot 50
IIS in-process hosting incorrectly throws ConnectionResetException for HTTP POST hot 47
HTTP Error 500.30 - ANCM In-Process Start Failure hot 43
Error: Server returned handshake error: Handshake was canceled. hot 43
Issue with BuildServiceProvider() in ConfigureServices() hot 42
source:https://uonfu.com/
Github User Rank List