RavenDB.Client 和 NetCoreApp1.0 无法连接



我试图在我的netcoreapp1.0上构建的aspnet5应用程序中使用RavenDB我正在运行这段代码:

 IDocumentStore store = new DocumentStore()
              {
                Url = "http://localhost:8080"
              }.Initialize();
string[] databaseNames = store.DatabaseCommands.GlobalAdmin.GetDatabaseNames(1);

和我的项目。Json格式如下:

 "dependencies": {
    "Microsoft.NETCore.App": {
        "version": "1.0.0",
        "type": "platform"
    },
    "Microsoft.AspNetCore.Mvc": "1.0.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel.Https": "1.0.0",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    "Microsoft.EntityFrameworkCore": "1.0.0",
    "Swashbuckle.SwaggerGen": "6.0.0-beta901",
    "Swashbuckle.SwaggerUi": "6.0.0-beta901",
    "RavenDB.Client": "3.5.0-rc-35173"
},
"frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "dnxcore50",
        "netstandard1.6",
        "portable-net452+win81"
      ]
    }
  }, ...

失败,有以下异常:

Exception thrown: 'System.ArgumentNullException' in System.Private.CoreLib.ni.dll
Additional information: SafeHandle cannot be null.

这个完全相同的代码已经在。net 45上进行了测试,并且工作正常。知道为什么会这样吗?

这是通过沉默"公共语言运行时异常"来解决的。这是由于RavenDB中错误的异常处理造成的。它看起来工作正常,即使有一个内部CLR异常

最新更新