Я пытаюсь сгенерировать сопоставления базы данных, используя Linq2Db, подключаясь к экземпляру MySQL. Однако, когда я пытаюсь запустить файл шаблона в Visual Studio, это вызывает ошибку соединения SSL, а также исключение File Not Found, говорящее о том, что он не может найти BouncyCastle.Crypto. Я пробовал несколько проектов, и я продолжаю получать эту ошибку. Он работал в другом проекте без каких-либо проблем. Но сейчас он просто не хочет сотрудничать.
Error Running transformation:
MySql.Data.MySqlClient.MySqlException (0x80004005): SSL Connection
error. ---> System.AggregateException: One or more errors occurred.
---> System.IO.FileNotFoundException: Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.3.0, Culture=neutral, PublicKeyToken=0e99375e54769942' or one of its dependencies. The system cannot find the file specified.
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at MySql.Data.Common.Ssl.StartSSL(Stream& baseStream, Encoding encoding, String connectionString)
---> (Inner Exception #0) System.IO.FileNotFoundException: Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.3.0, Culture=neutral, PublicKeyToken=0e99375e54769942' or one of its dependencies. The system cannot find the file specified.
File name: 'BouncyCastle.Crypto, Version=1.8.3.0, Culture=neutral, PublicKeyToken=0e99375e54769942'
at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
<---
at MySql.Data.Common.Ssl.StartSSL(Stream& baseStream, Encoding encoding, String connectionString)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at LinqToDB.Async.AsyncDbConnection.Open()
at LinqToDB.Data.DataConnection.EnsureConnection()
at LinqToDB.SchemaProvider.SchemaProviderBase.GetSchema(DataConnection dataConnection, GetSchemaOptions options)
at Microsoft.VisualStudio.TextTemplatingD2824CB3C7AE82E55C24545FCC5C772FAA5FFC60036C454D8924BF14A567283BB1BB669E693FBF53B1FDEE885877A654028D4F18DB00863F5E4E9F61A1BFECC3.GeneratedTextTransformation.LoadServerMetadata(DataConnection dataConnection) in C:\Users\joshu\.nuget\packages\linq2db.mysql\2.7.4\build\..\contentFiles\any\any\LinqToDB.Templates\DataModel.ttinclude:line 103
at Microsoft.VisualStudio.TextTemplatingD2824CB3C7AE82E55C24545FCC5C772FAA5FFC60036C454D8924BF14A567283BB1BB669E693FBF53B1FDEE885877A654028D4F18DB00863F5E4E9F61A1BFECC3.GeneratedTextTransformation.LoadMetadata(DataConnection dataConnection) in C:\Users\joshu\.nuget\packages\linq2db.mysql\2.7.4\build\..\contentFiles\any\any\LinqToDB.Templates\DataModel.ttinclude:line 415
at Microsoft.VisualStudio.TextTemplatingD2824CB3C7AE82E55C24545FCC5C772FAA5FFC60036C454D8924BF14A567283BB1BB669E693FBF53B1FDEE885877A654028D4F18DB00863F5E4E9F61A1BFECC3.GeneratedTextTransformation.LoadMySqlMetadata(String server, String database, String uid, String password, Int32 port) in C:\Users\joshu\.nuget\packages\linq2db.mysql\2.7.4\build\..\contentFiles\any\any\LinqToDB.Templates\LinqToDB.MySql.ttinclude:line 28
at Microsoft.VisualStudio.TextTemplatingD2824CB3C7AE82E55C24545FCC5C772FAA5FFC60036C454D8924BF14A567283BB1BB669E693FBF53B1FDEE885877A654028D4F18DB00863F5E4E9F61A1BFECC3.GeneratedTextTransformation.TransformText() in C:\Users\joshu\Projects\HSM.API\HSM.Data\DataModels\MySqlDb.tt:line 41 C:\Users\joshu\.nuget\packages\linq2db.mysql\2.7.4\build\..\contentFiles\any\any\LinqToDB.Templates\DataModel.ttinclude 103