Quantcast
Channel: Questions in topic: "dll"
Viewing all articles
Browse latest Browse all 706

Exclude some dlls to load when build is not PC?

$
0
0
Hello, I extended my editor with a windows forms window and when compiling for PC everything is fine. But when I try to compile for android or web player, it does not compile because it seems to use the System.Windows.Forms.dll even on these devices (which obviously doesn't work and I also don't need it there, I just need it for editing some game stuff). I also included System.Data and System.Drawing. I'm using the dlls from Unity/Editor/Data/Mono/lib/mono\2.0 (like recommended on the web) This is the error I'm getting : **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, BuildTarget target) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/AssemblyHelper.cs:137) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/AssemblyHelper.cs:172) UnityEditor.HostView:OnGUI()** and **Error building Player: Extracting referenced dlls failed.** It looks like it tries to load these dlls even when I don't need them. The entire class of the form is inside a `#if UNITY_EDITOR` but how can I exclude these dlls from being loaded when not having PC as active build?

Viewing all articles
Browse latest Browse all 706

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>