Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Natasha Jalen · Oct 31, 2014 at 02:49 AM · errorbuild-errordllcompile-error

Need some helps

I added some DLLs to my assets/plugins folder and I use them in my code. The code works fine and the DLLs work when I play it inside the editor. But as soon as I compile the build into google native client or web player. I'll come across this two errors. But the optimization for the api level is already set to .NET 2.0. Any helper out there is able to help me out?

Here is the following two errors.

1) Error building Player: Extracting referenced dlls failed.

2) ArgumentException: The Assembly System.Configuration is referenced by System.Data. 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:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/AssemblyHelper.cs:114) 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:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/AssemblyHelper.cs:117) 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:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/AssemblyHelper.cs:117) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/AssemblyHelper.cs:149) UnityEditor.HostView:OnGUI()

Here is my code :

 using UnityEngine;
 using system;
 using System.Data;
 using System.Data.SqlClient;
 using System.ComponentModel.DataAnnotations;
 using MySql.Data.MySqlClient;
 
 public class NewBehaviourScript : MonoBehaviour {
     
     //Public variables
     string weather;
     int seatAvailability;
     
     void Start () {
         string connectionString ="server=127.0.0.1;uid=****;pwd=********;database=pecdb;";
         
         MySqlConnection conn = new MySqlConnection(connectionString);
         conn.Open();
         MySqlCommand dbcmd = conn.CreateCommand();
         string sql =
             "SELECT weather,seatAvailability " +
                 "FROM location WHERE idlocation=21";
         dbcmd.CommandText = sql;
         IDataReader reader = dbcmd.ExecuteReader();
         while(reader.Read()) {
             weather = (string) reader["weather"];
             seatAvailability = (int) reader["seatAvailability"];
             print("Weather: " +
                   weather + "SeatAvailability: " + seatAvailability);
         }
         // clean up
         reader.Close();
         reader = null;
         dbcmd.Dispose();
         dbcmd = null;
         conn.Close();
         conn = null;
     }
     
     void Update()
     {
         
     }
     void OnGUI()
     {
         GUI.color = Color.black;
         GUI.Label (new Rect (10, 10, 200, 20), "Weather : " +weather);
         GUI.Label (new Rect (10, 30, 400, 30), "SeatAvailability : " +seatAvailability);
         
     }
     
     
 }
Comment
Add comment · Show 1
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
avatar image robertbu · Nov 05, 2014 at 05:30 AM 0
Share

Not sure these will solve your problem, but take a look at:

http://answers.unity3d.com/questions/541474/missing-namespaces.html

http://answers.unity3d.com/questions/517264/unity-and-the-dlls.html

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Mathieu_Dossmann · Oct 31, 2014 at 11:58 AM

Careful you wrote :

 using system;

instead of :

 using System;

Case sensitive is important!

Comment
Add comment · Show 1 · Share
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
avatar image Natasha Jalen · Nov 05, 2014 at 05:18 AM 0
Share

Thank you. I have edited my codes but i'm still having the same errors.

avatar image
0

Answer by fffMalzbier · Nov 05, 2014 at 08:39 AM

System.Data is not available in any of .net / mono profile unity uses. So your using System.Data; and using System.Data.SqlClient; will not work.

In this list you can find what available and whats not: http://docs.unity3d.com/410/Documentation/ScriptReference/MonoCompatibility.html

Comment
Add comment · Share
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

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

ArgumentException: The Assembly System.Configuration is referenced by System.Data. But the dll is not allowed to be included or could not be found. 1 Answer

Error building Player: Extracting referenced dlls failed. 8 Answers

Can't export game 3 Answers

Build APK error, Im using java 9, 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges