gkngkc / UnityStandaloneFileBrowser

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

Error when building from unity editor 2019.4 #96

Closed Tom4259 closed 2 years ago

Tom4259 commented 3 years ago

Have not managed yet to build my game because there are a few errors appearing which say that the file browser is 'not allowed' to be built or 'cannot be found'. It have seen many people say they have fixed this by changing the net 2 to the net 4 but I do not understand what that is. Thanks.

SVAYouni commented 3 years ago

Same problem here, i use HDRP and also changed to net 4, but still got the error.

ERROR:

ArgumentException: The Assembly Mono.WebBrowser is referenced by System.Windows.Forms ('Assets/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.List1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <6d0b5326886a4f0e8ed4ea356b37330b>:0) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <6d0b5326886a4f0e8ed4ea356b37330b>:0) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at <6d0b5326886a4f0e8ed4ea356b37330b>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

SVAYouni commented 3 years ago

Fix the problem for me hahaha, Change your Scripting Backend to "Mono"

Tom4259 commented 3 years ago

Fix the problem for me hahaha, Change your Scripting Backend to "Mono"

Same, I just forgot to change to net 4. Haven't done anything to do with mono yet

TE-JoakimElvander commented 3 years ago

I had the same problem (Unity 2019.4.11f1). The Mono build always worked (.NET 4.x), but got the same error as SVAYouni when building for IL2CPP. The solution that worked for me, was to copy Mono.WebBrowser.dll and Mono.Pozix.dll from the mono-build to the plugin folder where the Windows.Forms dll is located. Then everything worked. Have no explanation as to why though, but IL2CPP is a bit peculiar sometimes.

emmanuelproulx commented 3 years ago

I understand that IL2CPP mode has issues and that it's best to use Mono. BUT in a recent version, Mono was removed and now IL2CPP is the only option left. See https://docs.unity3d.com/Manual/windowsstore-il2cpp.html .

Please advise.

Enamul-Islam-Jisan commented 2 years ago

image

MohamedGamalBarghash commented 1 year ago

image

Unfortunately, it only worked for as it did not produce an error when building, but the build won't run. (using Unity 2020.3.23f1 on a windows 11 machine)

The answer that worked for me is to change the api compatibility to .net 4.0 from Player settings.