You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having an issue where everything runs smoothly on the first run and then running afterwards creates a 'Host can't be null' exception. Is there something I need to clear out to run multiple deploys during the same 'session'.?
Here is the exception I get in Visual Studio in my C# project.
System.ArgumentException: 'Host can't be null'
This exception was originally thrown at this call stack:
Npgsql.NpgsqlConnectionStringBuilder.PostProcessAndValidate() in NpgsqlConnectionStringBuilder.cs
Npgsql.NpgsqlConnection.SetupDataSource() in NpgsqlConnection.cs
Npgsql.NpgsqlConnection.ConnectionString.set(string) in NpgsqlConnection.cs
Npgsql.NpgsqlConnection.NpgsqlConnection(string) in NpgsqlConnection.cs
Scytec.DBManagement.DCI.PostgreSQL.Yuniql.YuniqlSqlDataService.CreateMasterConnection() in YuniqlSqlDataService.cs
Yuniql.Core.MetadataService.IsDatabaseExists(int?) in MetadataService.cs
Yuniql.Core.MigrationService.Run(string, string, bool?, System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>, bool?, string, string, string, int?, int?, string, string, string, bool?, string, bool) in MigrationService.cs
Yuniql.Core.MigrationService.Run() in MigrationService.cs
Scytec.DBManagement.DCI.PostgreSQL.Yuniql.YuniqlDeployer.Deploy(System.Data.IDbConnection) in YuniqlDeployer.cs
Scytec.DBManagement.Client.ViewModel.MainWindowViewModel.deployDCIDatabase.AnonymousMethod__0() in MainWindowViewModel.cs
...
[Call Stack Truncated]
Here is my code.
public bool Deploy(IDbConnection? p_cnx)
{
ArgumentNullException.ThrowIfNull(p_cnx);
m_logger.Notify("Deploy starting...");
var configuration = Configuration.Instance;
configuration.Platform = "postgresql";
configuration.Workspace = Path.Combine(Environment.CurrentDirectory, "PostgreSQL\\Yuniql");
configuration.ConnectionString = p_cnx.ConnectionString;
configuration.IsDebug = true;
configuration.IsAutoCreateDatabase = true;
var migrationServiceFactory = new MigrationServiceFactory(m_traceService);
var migrationService = migrationServiceFactory.Create(new YuniqlSqlDataService(m_traceService),
new YuniqlSqlBulkImportService(m_traceService));
migrationService.Run();
m_logger.Notify("Deploy done!");
return true;
}
Any help is appreciated.
The text was updated successfully, but these errors were encountered:
I am having an issue where everything runs smoothly on the first run and then running afterwards creates a 'Host can't be null' exception. Is there something I need to clear out to run multiple deploys during the same 'session'.?
Here is the exception I get in Visual Studio in my C# project.
System.ArgumentException: 'Host can't be null'
This exception was originally thrown at this call stack:
Npgsql.NpgsqlConnectionStringBuilder.PostProcessAndValidate() in NpgsqlConnectionStringBuilder.cs
Npgsql.NpgsqlConnection.SetupDataSource() in NpgsqlConnection.cs
Npgsql.NpgsqlConnection.ConnectionString.set(string) in NpgsqlConnection.cs
Npgsql.NpgsqlConnection.NpgsqlConnection(string) in NpgsqlConnection.cs
Scytec.DBManagement.DCI.PostgreSQL.Yuniql.YuniqlSqlDataService.CreateMasterConnection() in YuniqlSqlDataService.cs
Yuniql.Core.MetadataService.IsDatabaseExists(int?) in MetadataService.cs
Yuniql.Core.MigrationService.Run(string, string, bool?, System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>, bool?, string, string, string, int?, int?, string, string, string, bool?, string, bool) in MigrationService.cs
Yuniql.Core.MigrationService.Run() in MigrationService.cs
Scytec.DBManagement.DCI.PostgreSQL.Yuniql.YuniqlDeployer.Deploy(System.Data.IDbConnection) in YuniqlDeployer.cs
Scytec.DBManagement.Client.ViewModel.MainWindowViewModel.deployDCIDatabase.AnonymousMethod__0() in MainWindowViewModel.cs
...
[Call Stack Truncated]
Here is my code.
public bool Deploy(IDbConnection? p_cnx)
{
ArgumentNullException.ThrowIfNull(p_cnx);
}
Any help is appreciated.
The text was updated successfully, but these errors were encountered: