Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
7
Question by Ghostleg · May 13, 2015 at 10:55 AM · sql

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
13

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image warpmanih · Jun 01, 2018 at 10:20 PM 0
Share

I tried this and i still have the same problem

avatar image
2

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:\

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image drjfgi · May 05, 2017 at 08:47 AM 0
Share

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.

avatar image Bunny83 drjfgi · May 05, 2017 at 11:24 AM 0
Share

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.

avatar image warpmanih · Jun 02, 2018 at 06:09 PM 0
Share

I tried this and i still have the same problem

avatar image
0

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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

https://youtu.be/CtDSQkLdlZg

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I connect Unity to an SQL database in order to implement an MMO? 3 Answers

parameter error in microsoft SQL connection with unity3d 1 Answer

Players can decompile my game and find out the login and password to my sql server.... WHAT DO I DO?? 5 Answers

Retrieve the data from the Webserver Database 0 Answers

Connection Error with MS SQL 2014 and Unity3D 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges