Kestrel with IIS - libuv.dll missing on run : <p>We're setting up an existing Web API server to serve site(s) alongside an existing API. I have been loosely following <a href="http://miniml.ist/dotnet/how-to-serve-a-static-site-plus-a-web-api-in-aspnetcore/" rel="noreferrer">this article</a>.</p>

<p>Here's what my Global.asax.cs looks like:</p>

<pre><code>public class WebApiApplication : System.Web.HttpApplication
{
    protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();
        GlobalConfiguration.Configure(WebApiConfig.Register);
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        AutoMapperConfig.RegisterMappings();

        var host = new WebHostBuilder()
           .UseKestrel()
           .UseWebRoot("wwwroot")
           .UseIISIntegration()
           .UseStartup&lt;Startup&gt;()
           .Build();

        host.Run();
    }
}
</code></pre>

<p>and Startup.cs:</p>

<pre><code>public partial class Startup
{
    public void Configure(IApplicationBuilder app)
    {
        app.UseDefaultFiles();
        app.UseStaticFiles();
    }
}
</code></pre>

<p>When I run the project, I get the error</p>

<blockquote>
  <p>Unable to load DLL 'libuv': The specified module could not be found. (Exception from HRESULT: 0x8007007E)</p>
</blockquote>

<p>libuv is a dependency of Kestrel. If I manually copy it from the packages folder to the bin folder, it works. That seems to make sense with this <a href="https://github.com/aspnet/KestrelHttpServer/issues/735#issuecomment-247220516" rel="noreferrer">GitHub Issue comment</a>. Now that project.json is being moved away from, how can I get it to copy automatically?</p>

<p>Some have posited that it does not know whether to use 32 or 64 bit version of libuv because the Platform is set to Any CPU in the project properties. I have tried setting it to x64 in both the solution and project settings and the problem persists.</p>

<p><strong>How can I make libuv.dll copy directly to the build directory automatically?</strong></p>

<p>I do not consider including the file in the project (instead of in the packages folder) and setting it to copy to the output directory a real solution, only a workaround. I'm hoping to find a solution, not a workaround.</p>
