- Home /
System.Data.dll Assembly reference problem when built as webplayer
What happened is, I need to use System.Data.dll and System.EnterpriseServices.dll, but even when it's already in MonoDevelop library, Unity can't seem to find them. Next, I copy them into my asset folder, then they worked for the editor. But when I tried to built the project as webplayer, I got these log. Can anyone help me solve this?
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.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache) (at C:/BuildAgent/work/300357e52574df36/Editor/Mono/AssemblyHelper.cs:72)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache) (at C:/BuildAgent/work/300357e52574df36/Editor/Mono/AssemblyHelper.cs:75)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch) (at C:/BuildAgent/work/300357e52574df36/Editor/Mono/AssemblyHelper.cs:107)
UnityEditor.HostView:OnGUI()
Comment
Answer by Syameshk · Apr 17, 2014 at 09:49 AM
In the player settings change the api compatibility level to .NET 2.0.
Wiki
Answer by sooncat · May 23, 2012 at 11:26 AM
This is my guess:
The webplayer build as a sandbox, you can't use dlls which contains native functions. (write your own dll is OK).
Advice:Do not use System.***.dlls.
How are we supposed to access our $$anonymous$$ySQL tables then?