UnityStandaloneFileBrowser: ArgumentException: The Assembly System.Drawing is referenced by System.Windows.Forms ('Assets/UnityStandaloneFileBrowser-master/Assets/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll'). But the dll is not allowed to be included or could not be found.
Hi,
This time a have an issue:
ArgumentException: The Assembly System.Drawing is referenced by System.Windows.Forms ('Assets/UnityStandaloneFileBrowser-master/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.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:146)
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:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:152)
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:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:152)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:184)
UnityEditor.HostView:OnGUI()
All works great in the Unity Editor, but when I build I CANNOT run the build.

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (1 by maintainers)
Had a similar issue and I solved it by switching to Mono backend, IL2CPP doesn’t seem to work. Using unity 2020.1.0b4, the following works : .Net 4.x compatibility Mono backend (No need to copy any dlls)
Hello, i face this same problem, and the solution was put 2 dlls in plugins folder: Mono.Posix, Mono.WebBrowser I found this dlls on this folder: "C:\Program Files\Unity\Hub\Editor\2018.4.8f1\Editor\Data\MonoBleedingEdge\lib\mono\gac". And then works for me.
It doesn’t work with .NET 2.0 Subset. You need to choose .NET 2.0 under Player Settings / Api Compatibility Level.
Thanks a lot! I had the same problem and it worked once I switched to .Net 4.x
This helped me build the project, however the build won’t function properly. I finally solved the issue via setting Api Compatibility Level to .Net 4.x
I forgot to check that. It works.
Thanks!
Still having issues in Unity 2020.3.6f1 on Windows 10 Standalone target with Net. 4x and IL2CPP
Fixed with this tip from another user here: The solution was put 2 dlls in plugins folder: Mono.Posix, Mono.WebBrowser I found this dlls on this folder: “C:\Program Files\Unity\Hub\Editor\2018.4.8f1\Editor\Data\MonoBleedingEdge\lib\mono\gac”. And then works for me.
Hei I get the same issue with Unity Cloud Build. It is set to .Net 2.0 (no subset). Do I need to add the Drawing dll manually?