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.

dotnet build does not publish native dependencies for net451 on Mac and Linux

See original GitHub issue

Steps 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

@davidfowl @pakrym

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
simsodcommented, May 18, 2016

@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?

1reaction
TheRealPiotrPcommented, Apr 18, 2016

net45* projects are not supported on non-Windows OS’s for 1.0.0.

@richlander FYI

Read more comments on GitHub >

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

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