sdk: A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/app/bin/Debug/netcoreapp1.0'.
Environment:
- 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).
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (5 by maintainers)
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.