Resolved issue with inserting data into database

PsychoNINJA

Member
Joined
Sep 18, 2021
Messages
12
Programming Experience
1-3
Hello csharpforums community,
I have an issue that insert some data in MySQL Database by C# .NET Core 3.1 with MySql.Data.mysqlclient.dll and having these errors in console:

Could not load file or assembly 'Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106'. The system cannot find the file specified.
Could not load file or assembly 'System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Could not load file or assembly 'System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Could not load file or assembly 'System.Drawing.Common, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

and this error in visual studio:


I Installed MySqlConnector NuGET Package inside the visual studio, after that singed the library name 'using MySqlConnector;' replaced with 'using MySqlData.Data.MySqlClient;' then all of my live errors cleared, after launching my gamemode (RAGE MP) and used CMD that insert data into database I got new error:

Looks like it need a .dll file named similar like new NuGET package, I googled alot and finally didn't find any MySqlConnector.dll.

can someone help me please or give me some favor? :)
 
In the future, please post your code as text in code tags, not as a screenshot. The same goes for error messages. For those of us following this forum via small device like a phone, screenshots use up a lot of bandwidth and are hard to read.

Your first error about trying to load the SSH library assembly is even before trying to open the MySQL connection. Your second error is is about trying to load the MySQL assembly which is while trying to open the MySQL connection. The issues here is not about inserting into the database. The issues seem to surround your build or deployment process. It looks like you are missing some assemblies.
 
Back
Top Bottom