Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Can't load System.Data.dll

Discussion in 'Editor & General Support' started by UMSDev, Mar 22, 2018.

  1. UMSDev

    UMSDev

    Joined:
    Dec 17, 2017
    Posts:
    21
    Hello,

    I'm pretty new to Unity but starting to understand how it works.

    I've downloaded the last Unity (2018.1) and changed the scripting runtime version to 4.x.

    But I can't find which System.Data.dll I should include in my project (I need it for my System.Data.SQLite library that I compiled).

    If I check in Unity's folders There are a lot of folders in MonoBleedingEdge/lib/mono : 4.0, 4.0-api, 4.5, 4.5.1-api ...

    I tried with a few System.Data.dll found in those folders and made sure to use a dll with the same version as the one used to compile my System.Data.SQLite library.

    But I always get that "Loading script assembly "Assets/Plugins/System.Data.dll" failed!" when I run my game. Do you know why ? Or is there a possibility to have more details (like version of the dll expected)

    Thank you for your help :)
     
  2. DudoTheStampede

    DudoTheStampede

    Joined:
    Mar 16, 2015
    Posts:
    57
    Hi,

    have you tried going to Player Settings > Other Settings and setting "Api Compatibility Level" to ".NET 2.0"?
    By default it's ".NET 2.0 Subset".
     
  3. UMSDev

    UMSDev

    Joined:
    Dec 17, 2017
    Posts:
    21
    Thank you for your answer but it doesn't seem to work.

    I've also tried to put the one from Visual Studio (linked by default when you create a C# project, the one which is used to compile my System.Data.dll)
     
  4. diego-vieira

    diego-vieira

    Joined:
    Mar 27, 2015
    Posts:
    29
    Have you found a solution?
    I am having the same problem
     
  5. tsibiski

    tsibiski

    Joined:
    Jul 11, 2016
    Posts:
    334
  6. chriswadair

    chriswadair

    Joined:
    Apr 4, 2018
    Posts:
    3
    I've tried that solution myself, but can't get it to work either
     
  7. diego-vieira

    diego-vieira

    Joined:
    Mar 27, 2015
    Posts:
    29
    I got it working a few minutes ago, I had to take the System.Data.dll from this path:
    "C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\unityjit"

    The System.Data.dll in this path tagets 4.X .net and can be added to unity Plugins folder
     
  8. chriswadair

    chriswadair

    Joined:
    Apr 4, 2018
    Posts:
    3
    That fixed my problem too. Thanks!!
     
  9. Unity3D_Tim

    Unity3D_Tim

    Joined:
    Jun 20, 2016
    Posts:
    2
    That fixed my problem too. Thanks!!!!!
     
  10. Narmer

    Narmer

    Joined:
    Mar 5, 2014
    Posts:
    25
    Thank you so much!
     
  11. buFFalo94

    buFFalo94

    Joined:
    Sep 14, 2015
    Posts:
    251
    Thanks dude!
     
  12. apgarrard

    apgarrard

    Joined:
    May 6, 2018
    Posts:
    1
    You can also go from Unity to edit/Project settings/Player and then look for the Script Runtime version* under Configuration and go to .Net 4.6 or equivalent.
     
  13. lapartman997

    lapartman997

    Joined:
    Mar 28, 2019
    Posts:
    1
    I've been looking for hours. Thank you so much.
     
  14. inconnux13

    inconnux13

    Joined:
    Mar 18, 2020
    Posts:
    1
    [QUOTE = "diego-vieira, post: 3562281, membre: 806512"] Je l'ai fait fonctionner il y a quelques minutes, j'ai dû prendre le System.Data.dll à partir de ce chemin:
    "C: \ Program Files \ Unity \ Editor \ Data \ MonoBleedingEdge \ lib \ mono \ Unityjit"

    Le System.Data.dll dans ce chemin tagets 4.X .net et peut être ajouté au dossier Unity Plugins [/ QUOTE]
    merci sa m'a sauver au bout de 24h de recherche
     
  15. Liuary

    Liuary

    Joined:
    May 6, 2019
    Posts:
    1
    thank you! That's Right!
     
  16. BotelloAbraham

    BotelloAbraham

    Joined:
    Mar 19, 2019
    Posts:
    1
    Gracias.
    Eso soluciono mi problema.
     
  17. Lipe

    Lipe

    Joined:
    Sep 12, 2013
    Posts:
    11
    Thank you! I had this same issue when trying to use System.Drawing.dll and System.Drawing.Design.dll and this solved my build issue
     
unityunity