2015-05-14 189 views
0

我试图在DNX beta4的Mac OS X上运行Thinktecture IDP v3(https://github.com/IdentityServer/IdentityServer3)。Mac OS X上的DNX:System.DllNotFoundException

要做到这一点,我用自己的例子之一: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" 
    ] 
} 
+0

你无法分享你得到这个工作吗? –

+0

我把我们最终在Docker Hub上在线使用的IDP代码。 https://registry.hub.docker.com/u/ryan1234/thinktecture-idp/。作为一个笔记,我不得不将Thinktecture.IdentityServer3.dll和System.IdentityModel.Tokens.JWT.dll分别运行在Mono上。希望这些问题今年能够得到解决。 =) – ryan1234

回答

1

AFAIK有单声道4和ASP.NET贝塔4.用户单声道3.x和贝塔4之间的不兼容 - 或单声道4和β5 。

+0

该块实际上是对crypt32.dll的依赖。在构建过程(build.ps1)的ILMerge步骤之后,crypt32.dll似乎被捆绑在一起,并且令Mono感到厌烦。我从源代码重建并跳过ILMerge步骤,并手动包含所有依赖关系,似乎工作。 – ryan1234