Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Trouble connecting app with MySQL Database

Discussion in 'Editor & General Support' started by Silloty, Aug 14, 2019 at 7:56 AM.

  1. Silloty


    Jan 8, 2018
    Hi everyone

    I'm trying to connect my app to a MySQL database but I'm encountering an issue.
    While in Visual Studio 2017, everything is fine, it goes wrong when I'm trying to build my app.
    Indeed, I have the following errors :

    Assets\Scripts\DatabaseManager.cs(29,18): error CS0012: The type 'DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

    I've tried to remove manually the reference and add it again, but it didn't work.
    I also tried to replace the reference from the one located here : C:\Program Files\Unity 2018\Unity\Editor\Data\Mono\lib\mono\unity\System.Data.dll, but nothing changes.
    Does anyone have an idea how can I fix it ?
    I'm using Unity 2018.3.12f1

    Thanks a lot
  2. JeffDUnity3D


    Unity Technologies

    May 2, 2017
    Please show your code