0

I'm Using Unity3D 5 and mono develop as the compiler.

When I clicked build All from the mono compiler, it says "Build Successfully".

When I run the game in the editor, It works fine and functions as I expected.

But when I tried to build it as .exe for windows x86_64. It shows error...

ArgumentException: The Assembly System.Configuration is referenced by System.Data ('Assets/Plugins/System.Data.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:154)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:160)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:160)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:192)

here is the code of the only class who uses Sqlite as a test.

using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.Data.SQLite;
using Mono.Data.Sqlite;
using System;
using System.Configuration;

public class btnLogin : MonoBehaviour {

public static string NewText = "";

// Use this for initialization
public void CheckInfo(){

    GameObject ObjInputField = GameObject.FindWithTag ("txtUser");
    InputField txtUser = ObjInputField.GetComponent<InputField> ();

    GameObject ObjInputField1 = GameObject.Find ("txtPass");
    InputField txtPass = ObjInputField1.GetComponent<InputField> ();

    //InputField txtUser1 = GetComponent<GameObject.Find ("txtUser")>();

    //Text Mesj = GetComponent<GameObject.Find ("txtUser")> ();

    Debug.Log ("Move");

    SqliteConnection con = new SqliteConnection ();

    con.ConnectionString = Glo.conString;
    con.Open ();

    SqliteCommand cmd = new SqliteCommand ();
    cmd.CommandText = "SELECT * FROM tbl_Items_Basic";
    cmd.Connection = con;
    SqliteDataReader dr;
    dr = cmd.ExecuteReader ();
    string Mesj = "";
    int i = 0;
    while (dr.Read ()) {
        Mesj = dr["ItemName"].ToString();
        i++;
        if (i == 2){
            break;
        }
    }

    Debug.Log ( ": asd: " + Mesj);
    if (txtUser.text == "Genesis" && txtPass.text == "Mallari") {
        Application.LoadLevel ("Main0");

    } else {
        //EditorUtility.DisplayDialog ("SampleMessage", "The account does not exist", "Ok", "Cancel");

        txtUser.text = "Acc Does Not Exist";
        txtUser.textComponent.color = Color.red;
        txtPass.text = "";
    }
    con.Close ();
}

}

I've already tried to add in the reference the Assemby of System and System.Configuration by editing the reference in the explorer in mono. It still gave me the same error.

Thanks.

Genesis
  • 1
  • 2
  • SQLite is x86 or x64 dependable, a solution can be found on this site at [Loading x86 or x64 assembly](http://stackoverflow.com/questions/3787428/loading-x86-or-x64-assembly) – MX D May 14 '15 at 07:55
  • The instructions I've followed from searching in using SQLite in Unity are unclear. So I may really have a problem with this. Even without the System.Data.Sqlite. It is still working, also, what is Mono.Data.Sqlite?, I dont download it, but it is inside of mono's folders which I've searched. Does using Mono.Data.Sqlite alone good? – Genesis May 14 '15 at 08:32

0 Answers0