- Home /
using Mono.Data.Sqlite missing an assembly reference?
Dear all, I'm trying to use SQLite in unity for scoring purposes by following this tutorial https://www.youtube.com/watch?v=9SHz8mm-4Pw.
However, this error appeared when I add:
using Mono.Data.Sqlite;
Assets/Scripts/DataBaseManager.cs(4,12): error CS0234: The type or namespace name
Data' does not exist in the namespace
Mono'. Are you missing an assembly reference?
The Mono.Data.Sqlite DLL file had been put into the Assets>Plugins folder and Assets folder but the error is still the same.
*This dll can work previously, unitl I installed modules: Web Player, Microsoft Visual Studio Tools for Unity, Windows Build Support using Download Assistant to solve other issues.
Hope fellow expert can give your advise on how to solve this issue. Thank you very much!
Version: Unity version: UNITY 5.3.5 Visual Studio version: 2015 .Net framework: 4.6.01055
Answer by kxkhor · Jul 21, 2016 at 12:11 PM
I already solved the problem. Previously I'm using 32bit Unity. The version is change to 64bit when i use the download assistant. Therefore, I reinstall using 32bit and follow this instruction to install other modules without affecting the 32bit version: http://answers.unity3d.com/questions/1110749/how-to-get-the-pc-standalone-module-loaded-into-th.html. It works well again! Thank you.
Answer by walidabazo · Oct 01, 2017 at 04:48 PM
You can show this videos to connect unity 3d and sqlite and solved all dll error compile for different windows 32bit and 64bit
Answer by codemaker2015 · Dec 16, 2021 at 01:29 PM
This error occurs when we are trying to use SQLite in Unity 2019 or later versions. This error occurs due to missing of Mono library for Unity 2019 or later versions. You won't get this error if you are using Unity 2018 or less versions.
If you installed Unity 2018 or below versions then go to the installation directory <UnityInstallationDirecory>\Editor\Data\Mono\lib\mono\2.0
and copy the following files:
I18N.MidEast.dll
I18N.Other.dll
I18N.Rare.dll
I18N.West.dll
Mono.Data.Sqlite.dll
Mono.Data.SqliteClient.dll
System.Data.dll
to the project's <ProjectName>\Assets\Plugins
path.
Or you can simply resolve this error by downgrading the Unity version to 2018 or below.
Answer by William-Wang · Aug 09, 2018 at 05:38 AM
copy Mono.Data.Sqlite.dll and System.Data.dll to Assets\Plugins directory. and select the dll file and in inspector select Any Platform. exclude platforms is none.