Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Unloading broken assembly error on MySQL.data.dll after upgrading to 2018.1

Discussion in 'Editor & General Support' started by BennyTan, May 4, 2018.

  1. BennyTan

    BennyTan

    Joined:
    Jan 23, 2014
    Posts:
    141
    Project was working fine in 2017.4.2
    Upgraded to 2018.1 and received the following error

    "Unloading broken assembly Assets/Plugins/MySQL_Connector/MySql.Data.dll, this assembly can cause crashes in the runtime"

    Same error even in empty project with just MySQL.Data.dll.
    Any idea how to resolve this?

    Setting Details
    OS: Win 10 Pro x64
    Unity Ver: 2018.1
    Platform: Android
    Min Android API Level: 7.0
    MySQL .NET Connector Ver: 8.0.11
    Scripting Runtime: .NET 4.x Equivalent
    Scripting Backend: IL2CPP
    API Compatibility Level: .NET 4.x

    PS: Before any one says it, Yes, I know direct DB Connections are unsafe and I know I should switch to an intermediary like Server/PHP etc etc. Unfortunately for the requirements for this particular project are as such hence I need to get this working.
     
    Last edited: May 4, 2018
  2. BennyTan

    BennyTan

    Joined:
    Jan 23, 2014
    Posts:
    141
    Any one have any idea how to resolve this?
     
  3. josiperez

    josiperez

    Joined:
    Jan 12, 2017
    Posts:
    32
    I have the similar problem after update to unity3D 2018.1 (worked on unity3D 5.6):
    Unloading broken assembly Assets/Plugins/Npgsql.dll, this assembly can cause crashes in the runtime
    in Editor mode

    Environment:
    Unity 2018.1.1f1, Visual Studio Community 2017 with Tools for Unity, running in Windows 10 updated abr/2018;
    API NET 4.x; scripting backend Mono

    Use NuGet Packet Manager to add npgsql 3.2.7 and system.threading.tasks.extensions.4.3.0
    Copy npgsql 3.2.7 dll to
    C:\Program Files\Unity2017\Editor\Data\Mono\lib\mono\2.0\Npgsql.dll
    <ProjectPath>\Assets\Plugins
    <ProjectPath>\Library\PlayerDataCache\Data\Managed
    Anyone have suggestions to fix this?
    Thanks in advance
     
  4. josiperez

    josiperez

    Joined:
    Jan 12, 2017
    Posts:
    32
    I copy system.threading.tasks.extensions.dll to the same places than npgsql.dll and do not receive the message anymore.