Dim conn As MySqlConnection = New MySqlConnection(ServerString)
Dim cmd As MySqlCommand = New MySqlCommand
cmd.Connection = conn
conn.Open()
Dim mb As MySqlBackup = New MySqlBackup(cmd)
mb.ExportToFile("C:\backup.sql")
conn.Close()
I keep getting this error: An unhandled exception of type 'System.IO.FileLoadException' occurred in System.Windows.Forms.dll
Additional information: Could not load file or assembly 'MySqlBackup, Version=2.0.9.2, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
Any Suggestion? Thanks
For now only can assume,
1) see the version actually referenced and used on application.
2) see on .vbproj file for System.Windows.Forms,
<SpecificVersion></SpecificVersion>
if exist try removing this.
3) build your solution on 32-bit and 64-bit once at a time and see if it works on either of them
moreover, I assume number 1 and 3 can be but cannot be sure. try it
Sorry,if it didn't help and forgive for bad English
I just want to thank everyone who tried to answer this question. That's why i love this site. I fixed this problem, by uninstalling and installing back visual studio. Then i installed MySqlBackup.NET (using NuGet package manager) Version 2.0.9.3, which automatically installed MySql.Data version 6.9.9. It works perfectly. I'm not saying that's best solution, but it works.
To whoever worked on MySqlBackup.NET. Gold bless his heart. It works flawlessly and so easy to use.
User contributions licensed under CC BY-SA 3.0