Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Don't miss out on the Unite LA Keynote for the latest information from Unity! Set a reminder!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Problem to produce a webplayer or exe with the MySql dlls

Discussion in 'Scripting' started by BooBi, Feb 7, 2011.

  1. BooBi

    BooBi

    Joined:
    Jan 18, 2010
    Posts:
    528
    Hi,

    I've got an error when I'm producing my final file.

    The first time I did it, it worked for the exe but I wasn't able to connect myself to the database with the exe (But it works in the editor).
    Then I tried to export the webplayer version and it didn't produce anything, now when I'm trying to export a windows standalone i get these errors and I can't produce any exe.

    Obsiously the problem comes from the dlls... Do someone knows why and how to correct that ?
    I'm using a MySql.Data.dll, a System.Data.dll and a System.Drawing.dll

    Thank's for the help

    BooBi

    Here are the errors:

    Code (csharp):
    1. ArgumentException: The Assembly System.Configuration.Install is referenced by MySql.Data. But the dll is not allowed to be included or could not be found.
    2. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache) (at E:/BuildAgent/work/71ca6fec1b41cc30/Editor/Mono/AssemblyHelper.cs:52)
    3. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache) (at E:/BuildAgent/work/71ca6fec1b41cc30/Editor/Mono/AssemblyHelper.cs:55)
    4. UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch) (at E:/BuildAgent/work/71ca6fec1b41cc30/Editor/Mono/AssemblyHelper.cs:86)
    5. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    6.  
    Code (csharp):
    1. Error building Player: Extracting referenced dlls failed.
    2. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    3.  
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,598
    include the corresponding assembly in the unity project itself.
    but keep in mind that the security model of the webplayer forbids various things.

    also why would you want mysql in the build ... its not as if you would want to make your database globally reachable through a wildcard account normally (unless its for inhouse - incompany only)
     
  3. BooBi

    BooBi

    Joined:
    Jan 18, 2010
    Posts:
    528
    Hi I'm really not good at these database stuff...
    If you check this link you can see what the project is about.
    Previous post

    I still have a problem to write into a specific row...

    I mainly need to do an exe

    I'm not sure I really understand what to you meant... Right now, I've got a folder "libraries" with the dlls in my project (editor).

    Where should I put these dll ?
     
    Last edited: Feb 8, 2011
  4. BooBi

    BooBi

    Joined:
    Jan 18, 2010
    Posts:
    528
  5. BooBi

    BooBi

    Joined:
    Jan 18, 2010
    Posts:
    528
    I've got a big problem there !!!

    I can't do an EXE and I need to send the final version of this projet by the end of the week...

    Why can't I create a exe with the folder Libraries (which includes: MySql.Data.dll, System.Data.dll, System.Drawing.dll) ???

    What should I change or where should I put these files to have an EXE working and which can connect to the database ?

    As I found in UnityAnswers, I added the I18N.dll and the I18N.West.dll in my project folder, but it doesn't change anything... I added the MySQLDriverCS.dll aswell, no changes...
     
    Last edited: Feb 8, 2011
  6. BooBi

    BooBi

    Joined:
    Jan 18, 2010
    Posts:
    528
    up, even if I working on a xml version I'm still interessed to find a solution to my problem so if anyone had the same problem and can help me to find a solution or a way to use the database without that problem it could be really helpfull.

    thank's a lot

    BooBi
     
  7. alienx2

    alienx2

    Joined:
    Nov 19, 2010
    Posts:
    40
    I have same problem that cant export with mySQL dll.. but im asking which one kind of SQL that unity support??? MS SQL server, Oracle, SQLLite, mySQL, or other kind???
     
  8. XiangYang

    XiangYang

    Joined:
    Jun 13, 2012
    Posts:
    2
    Hello, BooBi. I have the same problem with you. Have you solved the problem? Could you tell me how to solve it ?
     
  9. BooBi

    BooBi

    Joined:
    Jan 18, 2010
    Posts:
    528
    I haven't no... for that project I used an XML file and saved localy in the end. But for another project I used php files instead of that method. I think you can find the answer in the unify wiki.
     
  10. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,598
    you can not build with it for webplayer no matter what you do

    For standalone you need to go into the unity folder, frameworks-mono-... and copy System.Configuration.dll over into your project
     
  11. XiangYang

    XiangYang

    Joined:
    Jun 13, 2012
    Posts:
    2
    hey, BooBi. My friend have solved it. He can build the web and exe successfully. He used unity 3.5f. And add six dlls in the assests folder.

    ( I18N.dll(1.0.5000.0), I18N.West.dll(1.0.5000.0) , I18N.CJK.dll(1.0.5000.0) , MySql.Data.dll(1.0.10.1) , System.Data.dll(copy from the unity setup folder) ,System.Drawing.dll(copy the unity setup folder) )
    If you add these six dlls , you can build it. But I add these six dlls can not build it. I think , the problem is I develop this project in XP, he develop the project in Win7.
     
  12. murugan

    murugan

    Joined:
    Jan 4, 2012
    Posts:
    4
    Same Error For Me Also Help Me
     
  13. murugan

    murugan

    Joined:
    Jan 4, 2012
    Posts:
    4
    I am Using The Database in Mysql In unity
    Run time Correct Working
    But Build The unity
    This error coming


    ArgumentException: The Assembly System.Configuration.Install is referenced by MySql.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) (at C:/BuildAgent/work/b0bcff80449a48aa/Editor/Mono/AssemblyHelper.cs:72)
    UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache) (at C:/BuildAgent/work/b0bcff80449a48aa/Editor/Mono/AssemblyHelper.cs:75)
    UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch) (at C:/BuildAgent/work/b0bcff80449a48aa/Editor/Mono/AssemblyHelper.cs:107)
    UnityEditor.HostView:OnGUI()


    Error building Player: Extracting referenced dlls failed.
     
  14. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    67
    I am the same problem. Do you have fix it?

    Regards

    Stefano
     
  15. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    867
    In player settings, choose ".NET 2.0" in API compatibility level instead of .NET 2 subset. and have i18 and i18-west dlls in your plugins directory and then it should work.
     
  16. UDN_1721e488-8a51-48c5-96ba-cbd16d7857cc

    UDN_1721e488-8a51-48c5-96ba-cbd16d7857cc

    Joined:
    Dec 7, 2012
    Posts:
    3
    Hello guyz,

    Problem resolved. AS Ashkan_gc said, just go to player settings>Other settings> and switch Api compatibility level to .Net 2.0

    Happy gaming :)
     
  17. beniii

    beniii

    Joined:
    Oct 10, 2018
    Posts:
    2
    i have the same problem....kindly tell me where we put theses dll files in asset folder....urgent???????
     
  18. beniii

    beniii

    Joined:
    Oct 10, 2018
    Posts:
    2
    where we find plugin setting and where we put theses i18 and i18-west dlls in plugins directory ???and where we find player settings?????
     
  19. Ashkan_gc

    Ashkan_gc

    Joined:
    Aug 12, 2009
    Posts:
    867
    @beniii put the DLLs
    in the Assets/Plugins folder and find player settings at Edit>Project Settings>Player
    .NET 4.6 might work as well. Keep in mind that I did this in Unity 4.x and years ago with older versions of MySQL connector for .NET but it should still work.

    .NET 4.6 version might not need the Unicode related DLLs