2015-05-14 230 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