sqlite issues!pls help me!Thanks!

When I use sqlite in unity,It can run in the edit mode .
But I cannot export it.(It can export in unity 2.6 ,bu cannot in unity 3.0.)

This is my program:
451013–15718–$sqlitetest.unitypackage (306 KB)

The error is:

ArgumentException: The Assembly System.Configuration is referenced by System.Data. But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[ ] allAssemblyPaths, System.String[ ] foldersToSearch, System.Collections.Generic.Dictionary2 cache)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[ ] allAssemblyPaths, System.String[ ] foldersToSearch, System.Collections.Generic.Dictionary2 cache)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[ ] allAssemblyPaths, System.String[ ] foldersToSearch, System.Collections.Generic.Dictionary2 cache)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[ ] paths, System.String[ ] foldersToSearch)
UnityEditor.HostView:OnGUI()

and:

Error building Player: Extracting referenced dlls failed.
UnityEditor.HostView:OnGUI()

copy system.data.dll from the unity install folder to your projects asset folder
unity does not copy it for you

given you are on standalone

Thank you dreamora!
But it doesnot the reason!

I have copy system.data.dll to my projects asset folder!
You can run my program above!
It can run in the edit mode .But I cannot export it.

Can anyone help me! Thanks!

what is your target platform?

For Standalone windows / osx it should work, for web it won’t work independent of what you do, mobiles might require additional framework (this also holds for standalone)

My target platform is osx and MAC standalon.
It cannot bulit !But can run in the edit mode .
I donnot know what can i do?

Can you apply me a example which can bulit MAC standalon abd ios?
Thanks dreamora!

Simple, create a “Plugins” folder and put ALL the DLL’s into that folder then when you build and deploy it will work.

Thank you zumwalt!
But i have done what like you say!
But it still cannot bulit!
Can you give me a example?

jbtxwd,

I had the same error message.

After copying the System.Data.dll from the unity program folder (as Dreamora mentioned) into the projects Plugin Folder (and overwriting the existing one from your package), at least the Sqlite related errors disappeared.

But … now a new error occurred :

Error building Player: SystemException: System.Net.Sockets are supported only on Unity iPhone Advanced. Referenced from assembly 'Mono.Data.Tds'.

OK , I don’t own Unity iPhone Advanced (just Basic) , but I never wanted to use .Net sockets. Should I consider this a bug or am I just out with Sqlite, because something has changed in Mono compared to earlier versions ?

If someone has an idea would be great , otherwise I will open a new thread about this maybe.


oxl

Check your build target and make sure it is not iOS

It was intended to build for iOS :wink: I’m just having iPhone Basic only …


oxl

Interesting, if you have zero code referencing the sockets library, this is then a bug IMO. I have iPhone basic also, but I don’t use SQLITE with it, I use playerprefs to avoid the space use and the overhead.

No , no references, the error (while buidling) popped up just after inserting the System.Data.dll from the unity folder into my project.

Will file a bug report.

I am currently using PlayerPrefs, too, but I wanted to uses something “higher” , as PlayerPfefs are getting a bit awkward , if you want to store dozens of level data arrays, high-scores for many players etc.

Looks like I had to stick with it, since I can’t get any other solution working on iOS . ( Not even your XML Scripts from the wiki, which worked great for me in the Editor / Standalone).


oxl

XML should work fine with playerprefs, even on the iPhone, granted I only deployed a demo to the Andriod phone but there is no difference in restrictions between Andriod and the iPhone… be right back…

See if this code works on your iPhone build, build and deploy this to your iPhone and run it.

461221–16194–$DemoPlayerPrefs.zip (123 KB)

Hi Zumwalt,

after a quick attempt it looks like it doesn’t … the attached iPad screenshot shows more info.

IIRC it is the same error as I encountered before with that wiki script on iOS. I’m not very experienced with serialization, so I tried other collections, but with no luck .

Anyway, thanks for helping, very much appreciated !

Btw, you added the library folder of your unity project into the .zip file, so my Unity instantly crashed after unzipping it into my Asset Folder :sunglasses:

oxl!

Sorry about that, I just zipped up the project, did it in Windows. I am home now and on my MacBook Pro, will find my cables and deploy to my iPhone and work on it to see if I can get around this problem, it works beautifully on the Andriod and AFAIK they are pretty much identical as far as restrictions. I need to see more information in that error window though. I will see how it reacts to my old iPhone and get back to you in this thread.

Ok, this is a Mono/Unity problem, it works fine in Andriod but the iPhone team doesn’t use the same library versions that Andriod team does, only thing I can recon, that or from the error, it doesn’t like the encoding or something strange… still looking through the code to see if I can fix this or not for the iPhone/iPad

From XCode

scratches head

Interesting, something else that doesn’t work is

        if (GUI.Button(new Rect(Screen.width - 70, 10, 60, 60), "Quit"))
        {
            Application.Quit();
        }

On the iPhone, it works on Android though, seems backwards that you can’t have a button to quit the application… why is that? oh well…

quick update, I tried every possible encoding, same result, there is a serialization issue, but it only is effected on the iOS, Andriod works, Mac works, Windows works, Web Builds work, all of the platforms that I own work except the iOS, so there is a core difference between the libraries used from the Mac to the iOS builds, nothing particular I can point directly at though, so it would be useless for me to file a bug, although I have submitted one, both of my queues have reached their maximum amount of allowed submitted bugs in the system, it no longer generates a bug report and gives me a ticket number, that is a totally different issues that I have already complained about and no response emails, so I gave up on that a few months back now. So simply tired of their bug system, come across problems like this and can’t even properly submit it

Thanks Zumwalt for your effort.

I’m glad that I am not the only one …… I would like to file a bug report, but due to my limited knowledge of serialization I’m not sure how to describe it exactly :frowning:

Anyone else experiencing problems with serialization on iOS who can help out maybe ?


oxl

I’ve experienced the same issue as Zumwalt, and I’ve been belting my head against it for a while now after writing a bunch of XML code for some stuff I’m doing. This is a major issue for me, as I’ll be doing alot of SOAP related stuff in my application…