question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Environment:

  1. VS 15.0.0-RC.2+26027.0.d15prerel
  2. Docker for Windows
  3. Share drive that contains %userprofile%, which is usually c: drive, in the settings of Docker for Windows.

Repro Steps:

  1. Create a new ASP.NET Core Web Application (.NET Core) project.
  2. Uncheck ‘Enable Container (Docker) Support’ if it is checked in the dialog.
  3. Edit .csproj file to add the following in order to workaround https://github.com/dotnet/sdk/issues/557:
  <PropertyGroup>
    <OutputType>exe</OutputType>
  </PropertyGroup>
  1. Reload project.
  2. Right click on the project, Add, Docker Project Support.
  3. 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:closed
  • Created 7 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
nguerreracommented, Dec 31, 2016

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

    <PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" />
1reaction
JoseFMPcommented, Jun 21, 2017

This issue still happening. Even I install explictely the package Microsoft.NETCore.App, the issue still there.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found