- Home /
Can't find System.Data
Hello. I'm using Unity 5.0.1f1 (64-bit) for windows and i've been trying to connect to DB so i should use packae System.Data. But when i'm typeing using System.Data;
i'm getting an error :
Error CS0234: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?) (CS0234) (Assembly-CSharp)
So it's seems to me that my unity doesn't have package System.Data. The question is : Where i can get it and how i can install it?
Thanks.
Answer by tebandesade · May 13, 2015 at 04:35 PM
Hi you have to add the .dll file of System.Data to your Assets\Plugins folder . To do so, go to your directory Unity\Editor\Data\Mono\lib\mono\2.0 and get the System.Data file and later add it to the folder mention before.
Answer by Jessespike · May 13, 2015 at 04:41 PM
If you have .NET installed already, you can copy the dll from there and paste into your project "Assets\Plugins".
Depending on which version you want, you can find the dll C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework or C:\Program Files (x86)\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0
If not, or still having trouble locating it. Do a search for "System.Data.dll" from C:\
I have done all this and it still will not find System.Data.dll in the C sharp scripts. I copied the C:\Program Files (x86)\Reference Assemblies\$$anonymous$$icrosoft\Framework.NETFramework version into Assets/Plugins as per the instructions. running $$anonymous$$S visual Studio community 2015 and Unity 5.6.0f3(64bit) Any suggestions as to where I am going wrong.
This is not an answer so i converted it into a comment.
First of all it's recommented to use the $$anonymous$$ono version that is shipped with Unity, see the answer of tebandesade above. Second, make sure you first start up Unity and make sure the DLL is recognised and there are currently no errors. If the dll shows up in Unity you can head over to VS. Unity is managing the VS project. So the required assembly reference in the VS project has to be set by Unity.
If that doesn't work, please ask a seperate question and include more details about your code that is trying to use something from that assembly. Note that System.Data is just a namespace. There might be other assemblies needed depending on what classes you actually need. For example the .NET $$anonymous$$YSQL connector has a seperate assembly that also implements certain classes in the System.Data namespace.
Answer by BenReese · Jun 15, 2016 at 06:21 AM
Hi, I have followed the instructions here (and in various other posts) and it all seems to make sense. I have no issues at compile time or in Unity itself except that when I try to run the project I get a nice big message saying that "All compiler errors must be fixed before you can enter play mode". Well There are no compiler errors!
I have take System.Data.dll from C:\Program Files\Unity\Editor\Data\MonoBleedingEdge\lib\mono\2.0
The error seems to manifest as soon as I try to instantiate a SqlConnection object. I can create a variable reference to it no problem, but cannot instantiate it.
I can however create objects in System.Data.SqlClient no problem.
Any More ideas please
Answer by walidabazo · Oct 01, 2017 at 04:46 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 TooManySugar · Jul 18, 2018 at 10:00 PM
I was facing same issue and this can be 2 issues.
I already had the system.data dll in plugins.
BUT it was not being referenced BECAUSE that dll targets .net3.5 and I was building targeting 4.X
Switch to 3.5, restart Unity, relaunch VS and tadaaa.
Your answer
![](https://koobas.hobune.stream/wayback/20220613195459im_/https://answers.unity.com/themes/thub/images/avi.jpg)