【问题标题】:DNX on Mac OS X: System.DllNotFoundExceptionMac OS X 上的 DNX:System.DllNotFoundException
【发布时间】:2015-05-16 14:46:52
【问题描述】:

我正在尝试在带有 DNX beta4 的 Mac OS X 上运行 Thinktecture IDP v3 (https://github.com/IdentityServer/IdentityServer3)。

为此,我使用了他们的一个示例:https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/AspNet5Host

如果我在 Windows 上运行示例,一切都很好。

在 OS X 上,使用 Mono 4.0.1 和 DNX beta4,当我运行时:

mono .../.dnx/runtimes/dnx-mono.1.0.0-beta4/bin/dnx.mono.managed.dll . kestrel

我收到以下错误:

[0x7fff74d46300:] EXCEPTION handling: System.DllNotFoundException: api-ms-win-core-file-l1-2-0.dll
[0x7fff74d46300:] EXCEPTION handling: System.EntryPointNotFoundException: ReadFile
[0x7fff74d46300:] EXCEPTION handling: System.EntryPointNotFoundException: LoadLibraryExW
[0x7fff74d46300:] EXCEPTION handling: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
Started

我正在尝试找出 api-ms-win-core-file-l1-2-0.dll 是什么以及需要什么。单核细胞增多症? Thinktecture 包?

我的project.json如下:

{
  "webroot": "wwwroot",
  "version": "1.0.0-*",

  "dependencies": {
    "Kestrel": "1.0.0-beta4",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
    "Thinktecture.IdentityServer3": "1.5.0",
    "Microsoft.AspNet.Owin": "1.0.0-beta4",
    "Microsoft.Owin": "3.0.1",
    "Microsoft.AspNet.DataProtection": "1.0.0-beta4",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta4"
  },

  "commands": {
      "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
      "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5005"
  },

  "frameworks": {
    "dnx451": { }
  },

  "publishExclude": [
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
  ],
  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ]
}

【问题讨论】:

  • 您将无法分享您如何让这个工作正常吗?
  • 我把我们最终使用的 IDP 代码放到了 Docker Hub 上。 registry.hub.docker.com/u/ryan1234/thinktecture-idp。作为说明,我必须分叉 Thinktecture.IdentityServer3.dll 和 System.IdentityModel.Tokens.JWT.dll 才能在 Mono 上运行。希望这些问题能在今年得到解决。 =)

标签: macos mono thinktecture-ident-server dnx


【解决方案1】:

AFAIK Mono 4 和 ASP.NET Beta 4 之间不兼容。用户使用 Mono 3.x 和 Beta 4 - 或 Mono 4 和 Beta 5。

【讨论】:

  • 该块实际上是对crypt32.dll的依赖。在构建过程的 ILMerge 步骤 (build.ps1) 之后,crypt32.dll 似乎被捆绑在一起,这让 Mono 感到震惊。我从源代码重建并跳过了 ILMerge 步骤并手动包含了所有依赖项,这似乎有效。
猜你喜欢
  • 2011-08-24
  • 2012-08-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-03-16
  • 2013-05-03
  • 2012-05-10
相关资源
最近更新 更多