Kestrel with IIS - libuv.dll missing on run
I've had a similar problem before when migrating projects. Visual Studio may misbehave a lot with mismatched projects.
Simple Answer: You need to change your projects to the MSBuild/csproj format.
To start with, if you are trying to use .NET Core in your solution, then right-click your project(s) in Visual Studio, and if you don't see Edit xxxxxx.csproj
then you're likely going to have issues like the one you are reporting above.
Basically, the .NET Core project templates uses different tooling when compiling the project.
The solution below is a generic way to solve almost all issues regarding projects that try to target .NET Core, but wish to use libraries from another framework. There isn't a good tool (so far) to bridge this problem, so you're going to have to go manual-mode.
Let's get started.
The solution is quite simple (but it's a bit tedious).
Step 1: Make a new project using the new MSBuild/csproj format
Create a new project, and select ".NET Core".
In almost all cases, you probably want to avoid using the ASP.NET Core Web Application template, but that's for another discussion all together.
Step 2: Target the correct framework
Right-click the project and select Edit xxxxxx.csproj
<PropertyGroup> <TargetFramework>net452</TargetFramework> <!--you will also probably want to note that you need these for a console app --> <OutputType>Exe</OutputType> <RuntimeIdentifier>win7-x64</RuntimeIdentifier></PropertyGroup>
Pick a framework you want to target, and make sure that it's supported (here is a table).
I have used net452
in the above code snippet for an example. You can find out more about the naming here.
Step 3. Repeat for all projects.
You're going to have to do this for every project in your solution to keep Visual Studio from behaving unexpectedly.
There really isn't much online about how to get ASP.NET Core to work well with old frameworks. Hopefully this will help you out. I wish I had this advice earlier on myself.
I just install nuget package to my project and redeploy.
Install-Package Libuv -Version 1.10.0
Try this - it could solve your problem:
var host = new WebHostBuilder() .UseKestrel() // .UseWebRoot("wwwroot") keep it if you need it .UseContentRoot(Directory.GetCurrentDirectory()) // this could solve your problem // .UseUrls("http://0.0.0.0:5000") use this if you're using nginx .UseIISIntegration() .UseStartup<Startup>() .Build();