Asp.net core System.DllNotFoundException:无法加载DLL';libuv&x27;在Windows Server 2008 R2上发布.NET核心网站时

Asp.net core System.DllNotFoundException:无法加载DLL';libuv&x27;在Windows Server 2008 R2上发布.NET核心网站时,asp.net-core,asp.net-core-mvc,.net-core,asp.net-core-1.0,libuv,Asp.net Core,Asp.net Core Mvc,.net Core,Asp.net Core 1.0,Libuv,在Windows Server 2008 R2上发布.NET核心Asp.NET Web应用程序时出错。它与libuv有关: Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.DllNotFoundException: Unable to load DLL 'libuv': The specified module could not be found. (Exce

在Windows Server 2008 R2上发布.NET核心Asp.NET Web应用程序时出错。它与libuv有关:

Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.DllNotFoundException: Unable to load DLL 'libuv': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.NativeMethods.uv_loop_size()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.loop_size()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvLoopHandle.Init(Libuv uv)
at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelThread.ThreadStart(Object parameter)
奇怪的是,当我在开发机器上本地发布时,我可以在发布文件夹中看到libuv.dll。该应用程序通过IIS在我的本地计算机上运行

project.json框架:

"frameworks": {
  "net461": {}
},
dotnet restore
dotnet build
dotnet publish --configuration Release  --runtime active
使用这些命令:

"frameworks": {
  "net461": {}
},
dotnet restore
dotnet build
dotnet publish --configuration Release  --runtime active

你知道我如何解决这个问题吗?

10个月后,我找到了这个错误的原因,至少现在是什么导致了这个错误

我使用.net core 1.1创建了一个旧的web api项目,并在
*.csproj
文件中找到了此
PropertyGroup


网络47
win7-x86
在我几天前创建的一个较新项目中,使用较新的模板和.NET Core 2.0,它看起来如下所示:


网络47

此处缺少
运行时标识符
。我将它添加到新项目中,错误消失了。现在服务器按预期启动。

我也遇到了同样的问题。我解决了这个问题,从csproj中删除这个字符串

  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == 'net461'">
    <Reference Include="System.ServiceModel" />
  </ItemGroup>


您使用的是最终版本的asp.net-core吗?这个问题在RC2发行版中得到了修复——这个问题的问题是标题声明它是针对core的,但project.json文件显示了其他问题。