我在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不兼容。
必須有一些我做錯了,因爲其他人似乎沒有問題,這更多。
任何想法?