sdk: Every Other "dotnet run" command fails with `libhostpolicy.so` error
Steps to reproduce
I recently transitioned a .NET core project.json project to msbuild. dotnet watch run -c Docker used to work fine, but now half of the time it encounters an error.
Expected behavior
App should rebuild and run every time
Actual behavior
Half of the time the app builds and runs properly. The other half of the time, the app fails with the error A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/dotnet/app/bin/Docker/netcoreapp1.1'. Note that I was just adding a space when updating the app.csproj file to trigger a rebuild.
[DotNetWatcher] info: File changed: /dotnet/app/app.csproj
[DotNetWatcher] info: Running dotnet with the following arguments: run -c Docker
[DotNetWatcher] info: dotnet process id: 11514
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/dotnet/app/bin/Docker/netcoreapp1.1'.
[DotNetWatcher] fail: dotnet exit code: 131
[DotNetWatcher] info: Waiting for a file to change before restarting dotnet...
[DotNetWatcher] info: Running dotnet with the following arguments: run -c Docker
[DotNetWatcher] info: dotnet process id: 11993
Hosting environment: Production
Content root path: /dotnet/app
Now listening on: http://*:5000
Application started. Press Ctrl+C to shut down.
Application is shutting down...
[DotNetWatcher] info: dotnet exit code: 0
[DotNetWatcher] info: File changed: /dotnet/app/app.csproj
[DotNetWatcher] info: Running dotnet with the following arguments: run -c Docker
[DotNetWatcher] info: dotnet process id: 12459
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/dotnet/app/bin/Docker/netcoreapp1.1'.
[DotNetWatcher] fail: dotnet exit code: 131
[DotNetWatcher] info: Waiting for a file to change before restarting dotnet...
Environment data
$ dotnet --info
.NET Command Line Tools (1.0.0-preview4-004233)
Product Information:
Version: 1.0.0-preview4-004233
Commit SHA-1 hash: 8cec61c6f7
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/1.0.0-preview4-004233
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Disabling E2E_tests on non windows. Workaround for dotnet/cli/issues/5059 — committed to dotnet/Scaffolding by prafullbhosale 8 years ago
had the same issues. I created .NET Core Web Application from VS2015 template and used publish to folder. When I ran publish output content on ubuntu 16.04 manually using “dotnet” I got the error. Fixed it by changing the project.json dependency for Microsoft.NETCoreApp, from this:
"Microsoft.NETCore.App": "1.1.0",to this:
The platform type added the runtimes directory to publish package.
CLI version: 1.0.0-preview2-1-003177
You can simply get the latest from github.com/dotnet/cli.
But you can get it here as well, though on the page above it will be a newer version: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/1.0.0-preview5-004422/dotnet-dev-osx-x64.1.0.0-preview5-004422.pkg.
Can you try this one: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/1.0.0-preview5-004422/dotnet-sdk-ubuntu.16.04-x64.1.0.0-preview5-004422.deb?