• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Latedi · Mar 08, 2013 at 10:54 PM · c#dllmysqltypeloadexception

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 ()

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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

Dll distribution of Conditionally Compiled project 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges