RavenDB.Client NetCoreApp1.0 无法连接

RavenDB.Client and NetCoreApp1.0 won't connect

我正在尝试在基于 netcoreapp1.0 构建的 aspnet5 应用程序中使用 RavenDB 我是 运行 这个代码:

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

我的 project.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 上进行了测试并且有效。知道为什么会这样吗?

这已通过将 "Common Language Runtime Exceptions" 静音来解决。这是由于 RavenDB 中错误的异常处理造成的。即使存在内部 CLR 异常,它看起来也能正常工作。