【发布时间】:2017-02-08 10:50:12
【问题描述】:
在 Windows Server 2008 R2 上发布我的 .NET Core 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
知道如何解决这个问题吗?
【问题讨论】:
-
您使用的是 asp.net-core 的最终版本吗?类似这个问题的接缝已在 RC2 版本中修复 - github.com/aspnet/KestrelHttpServer/issues/627
-
这个问题的问题是标题声明它是核心,但 project.json 文件显示其他情况。
标签: asp.net-core asp.net-core-mvc .net-core asp.net-core-1.0 libuv