A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/app/bin/Debug/netcoreapp1.0'.
See original GitHub issueEnvironment:
- VS 15.0.0-RC.2+26027.0.d15prerel
- Docker for Windows
- Share drive that contains %userprofile%, which is usually c: drive, in the settings of Docker for Windows.
Repro Steps:
- Create a new ASP.NET Core Web Application (.NET Core) project.
- Uncheck ‘Enable Container (Docker) Support’ if it is checked in the dialog.
- Edit .csproj file to add the following in order to workaround https://github.com/dotnet/sdk/issues/557:
<PropertyGroup>
<OutputType>exe</OutputType>
</PropertyGroup>
- Reload project.
- Right click on the project, Add, Docker Project Support.
- F5.
Expected: VS launches the app to run in a Linux container.
Actual: A fatal error was encountered. The library ‘libhostpolicy.so’ required to execute the application was not found in ‘/app/bin/Debug/netcoreapp1.0’. The program ‘’ has exited with code 131 (0x83).
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
A fatal error was encountered. The library 'libhostpolicy.so ...
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/app'. docker .
Read more >A fatal error was encountered. The library 'libhostpolicy.so ...
The library 'libhostpolicy.so' required to execute the application was not found in '/app/'. This is my Dockerfile: ` FROM mcr.microsoft.com/ ...
Read more >A fatal error was encountered. The library 'libhostpolicy.so ...
dll to run was incorrect (library instead of web application). first i acvieve successfull service start with dotnet publish "myproject.csproj" -c release -o...
Read more >A fatal error was encountered. The library 'libhostpolicy.so' ...
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found - Linux · 1. Install .NET Core...
Read more >dll error on ubuntu 18
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in ',filepath>'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The root cause here was a missing reference to Microsoft.NETCore.App package. The SDK needs this reference to emit a correct runtimeconfig. It should be fixed by https://github.com/aspnet/Templates/pull/774
The workaround if that fix hasn’t arrived to you is to add the following to the csproj
This issue still happening. Even I install explictely the package Microsoft.NETCore.App, the issue still there.