gkngkc / UnityStandaloneFileBrowser

A native file browser for unity standalone platforms
MIT License
2.01k stars 317 forks source link

[Not the usual?] ArgumentException: System.Windows.Forms.dll in Mac #56

Closed giggioz closed 5 years ago

giggioz commented 5 years ago

Hi,

I tried to find a similar issue among the others but I think this is a different case.

I'm using a Mac Book Pro with Unity 2018.3.4.f1 and I want to build a Windows Standalone App.

Using this plugin gives me this error at building time:

ArgumentException: The Assembly Mono.WebBrowser is referenced by System.Windows.Forms ('Assets/Plugins/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll'). 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[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:150)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:156)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:190)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

The file is in the correct path and here my settings

image

image

If someone needs other information just ask, thanks!

giggioz commented 5 years ago

I changed these settings

image

And it worked!

UnVoiding commented 5 years ago

Thanks, @giggioz! It worked for me too. Do you know the real cause of the issue? Changing compatibility level to 4.0 looks like an overkill and can harm other dependencies

giggioz commented 5 years ago

I'm sorry, I did not investigate the cause :/