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
run in windows is ok, but centOS show error:Could not load file or assembly 'MySqlBackupNet.MySqlConnector, Version=2.3.6.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
#83
Closed
CatcherX opened this issue
Jan 23, 2022
· 4 comments
Could not load file or assembly 'MySqlBackupNet.MySqlConnector, Version=2.3.6.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
my code is :
backupPath += "\" + DateTime.Now.ToString("yyyy-MM-dd_HH_mm_ss.sql");
using (MySqlConnection conn = new MySqlConnection(GlobalContext.SystemConfig.DBConnectionString))
{
using (MySqlCommand cmd = new MySqlCommand())
{
using (MySqlBackup mb = new MySqlBackup(cmd))
{
cmd.Connection = conn;
conn.Open();
mb.ExportToFile(backupPath);
conn.Close();
}
}
}
The text was updated successfully, but these errors were encountered:
You can also compile the binaries into single "self-contained" binary. With this method, the .NET Core App can be run directly on CentOS (Linux) without installing any dotnet runtime.
Here is the screenshot for publishing the "self-contained" binary:
Here is the example of how it looks like after publishing, there is only 1 single file:
Copy the compiled binary to CentOS
At the terminal, browse to the folder that contains the self-contained binary, for example:
cd /home/admin/testapp
Next, is to allow execution permission to the file:
Could not load file or assembly 'MySqlBackupNet.MySqlConnector, Version=2.3.6.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
my code is :
The text was updated successfully, but these errors were encountered: