我在CentOS 7.1MissingMethodException与+ Npgsql的CLI DOTNET在CentOS 7.1连接
运行DOTNET CLI版本1.0.0-rc2-002439我建立的只是执行针对一个选择的原型控制台应用程序PostgreSQL 9.4数据库。
我只针对DNXCORE50和Windows,一切正常。当我运行它在CentOS我得到下面的异常上conn.Open()
Unhandled Exception: System.MissingMethodException: Method not found: 'Void System.Net.Security.SslStream.AuthenticateAsClient(System.String, System.Security.Cryptography.X509Certificates.X509CertificateCollection, System.Security.Authentication.SslProtocols, Boolean)'.
at Npgsql.NpgsqlConnector.RawOpen(NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnector.Open()
at Npgsql.NpgsqlConnectorPool.GetPooledConnector(NpgsqlConnection Connection)
at Npgsql.NpgsqlConnectorPool.RequestConnector(NpgsqlConnection connection)
at Npgsql.NpgsqlConnection.OpenInternal(NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnection.Open()
at SensorBot.Core.Services.ConfigService.GetConfig()
at ConsoleApplication.Program.Main(String[] args)
这里是我使用的project.json:
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": false
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-23811"
},
},
"runtimes": { "centos.7-x64": { } },
"frameworks": {
"dnxcore50": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Console": "4.0.0-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Threading": "4.0.11-beta-23516",
"System.IO": "4.1.0-*",
"System.IO.FileSystem": "4.0.1-rc2-23811",
"System.Runtime.Serialization.Primitives": "4.1.1-*",
"System.Dynamic.Runtime": "4.0.11-*",
"System.Net.Security": "4.0.0-beta-23405",
"System.Net.NetworkInformation": "4.1.0-beta-23405",
"System.Text.RegularExpressions": "4.0.12-rc2-23811",
"Npgsql": "3.1.0-alpha6"
}
}
}
}
我见过的Npgsql的的Github上,使用https://www.myget.org/gallery/npgsql-unstable
作为一个包源代码,并使用Npgsql的不稳定版本修复它,但是当我使用"Npgsql": "3.1.0-unstable0458"
时,该应用程序无法编译,并表示此版本的npgsql与DNXCore 5.0不兼容。
必须有一些我做错了,因为其他人似乎没有问题,这更多。
任何想法?