- Home /
DLL problems for MySql
Hello
So I'm trying to connect my Unity project to a MySql server. Basically I copied what some others have done and ended up with this in the script which is going to connect to the server:
using UnityEngine;
using System;
using System.Collections;
using System.Data;
using MySql.Data.MySqlClient;
using MySql.Data;
Which required me to put MySql.Data.dll, System.Data.dll and System.Drawing.dll in the assets folder.
However now when I run the game I get the following error and I pretty much lack the technical knowledge of understanding what I'm doing. I did change the Project Settings -> Player -> Optimization -> Api Compability Level to .NET 2.0 but I don't think it made any difference.
TypeLoadException: Could not load type 'System.CLSCompliantAttribute' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) System.Reflection.Assembly.GetCustomAttributes (System.Type attributeType, Boolean inherit) System.Resources.ResourceManager.GetNeutralResourcesLanguage (System.Reflection.Assembly a) System.Resources.ResourceManager..ctor (System.String baseName, System.Reflection.Assembly assembly) MySql.Data.MySqlClient.Resources.get_ResourceManager () MySql.Data.MySqlClient.Resources.get_UnableToConnectToHost () MySql.Data.MySqlClient.NativeDriver.Open () MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) MySql.Data.MySqlClient.MySqlConnection.Open ()
Your answer
Follow this Question
Related Questions
Unity C# MySQL Issues 1 Answer
How is it best to distribute a complex unity project to other devs as asingle dll 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Add to MySql.Data error 2 Answers