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.
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.
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:\
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
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\Microsoft\Framework.NETFramework version into Assets/Plugins as per the instructions.
running MS visual Studio community 2015 and Unity 5.6.0f3(64bit)
Any suggestions as to where I am going wrong.
You can show this videos to connect unity 3d and sqlite and solved all dll error compile for different windows 32bit and 64bit
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.