dotnet build does not publish native dependencies for net451 on Mac and Linux
See original GitHub issueSteps to reproduce
Run build.sh
from https://github.com/aspnet/KestrelHttpServer on Mac and/or linux.
You can also reproduce by running KestrelHttpServer/samples/SampleApp
using dotnet run -f net451
.
Expected behavior
All the tests should pass. The sample app should run successfully.
Actual behavior
You will see the Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
project fail on net451/mono due to test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/System.DllNotFoundException : libuv
. This is caused by a lack of libuv.so
in bin/Debug/net451/[rid]/
.
The Kestrel SampleApp exits immediately with
System.AggregateException: One or more errors occurred. ---> System.DllNotFoundException: libuv
at (wrapper managed-to-native) Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv/NativeMethods:uv_loop_size ()
at Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv.loop_size () [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv uv) [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Wait () [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelEngine.Start (Int32 count) [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[Context] (IHttpApplication`1 application) [0x00000] in <filename unknown>:0
---> (Inner Exception #0) System.DllNotFoundException: libuv
at (wrapper managed-to-native) Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv/NativeMethods:uv_loop_size ()
at Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv.loop_size () [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv uv) [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) [0x00000] in <filename unknown>:0 <---
dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[5]
Hosting shutdown
[ERROR] FATAL UNHANDLED EXCEPTION: System.AggregateException: One or more errors occurred. ---> System.DllNotFoundException: libuv
at (wrapper managed-to-native) Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv/NativeMethods:uv_loop_size ()
at Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv.loop_size () [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv uv) [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken) [0x00000] in <filename unknown>:0
at System.Threading.Tasks.Task.Wait () [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelEngine.Start (Int32 count) [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[Context] (IHttpApplication`1 application) [0x00000] in <filename unknown>:0
---> (Inner Exception #0) System.DllNotFoundException: libuv
at (wrapper managed-to-native) Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv/NativeMethods:uv_loop_size ()
at Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv.loop_size () [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNetCore.Server.Kestrel.Networking.Libuv uv) [0x00000] in <filename unknown>:0
at Microsoft.AspNetCore.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) [0x00000] in <filename unknown>:0 <---
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-rc2-002416)
Product Information:
Version: 1.0.0-rc2-002416
Commit Sha: 37f00f24e9
Runtime Environment:
OS Name: ubuntu
OS Version: 14.04
OS Platform: Linux
RID: ubuntu.14.04-x64
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
recommended way to package native dependencies ...
Hi, Hopefully this is a right place to ask questions, not sure if I have to ... The dotnet publish command picks up...
Read more >Simplest way to build dotnet SDK project requiring net461 ...
(using .NET Core SDK) The simplest way to build for a .NET Framework TFM when running on either macOS or Linux using the...
Read more >dotnet publish command - .NET CLI
Name. dotnet publish - Publishes the application and its dependencies to a folder for deployment to a hosting system.
Read more >dotnet build command - .NET CLI
The dotnet build command builds a project and all of its dependencies.
Read more >Build .NET Core Application That Runs on Linux and macOS
This example shows how to create a .NET assembly using the Library Compiler and integrate it into a .NET Core application that can...
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
@piotrpMSFT: is this for real? How has this not been communicated clearly to the community? Dropping support for net451 on osx/mono is a HUGE deal for many of us. Is there a workaround or something using imports?
net45* projects are not supported on non-Windows OS’s for 1.0.0.
@richlander FYI