gkngkc / UnityStandaloneFileBrowser

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

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. #2

Closed tomaszzackiewicz closed 7 years ago

tomaszzackiewicz commented 7 years ago

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.

image

gkngkc commented 7 years ago

It doesn't work with .NET 2.0 Subset. You need to choose .NET 2.0 under Player Settings / Api Compatibility Level.

tomaszzackiewicz commented 7 years ago

I forgot to check that. It works.

Thanks!

pinchukovartur commented 6 years ago

Thanks!)

fafase commented 6 years ago

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?

NumaNumaNuma commented 5 years ago

Same issue here, did you figure it out?

DeveloperMujtaba commented 5 years ago

still facing this issue!

CristianSR commented 4 years ago

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.

DeveloperMujtaba commented 4 years ago

@CristianSR this issue also arises when we have miss any reference assembly or include multiple assemblies with different versions.

xiaoas commented 4 years ago

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.

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

foxnoodles commented 4 years ago

@gkngkc did you completely abandon this project? It would be nice to state it clearly.

tadeseus commented 4 years ago

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

Thanks a lot! I had the same problem and it worked once I switched to .Net 4.x

Khan-amil commented 4 years ago

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)

ilyazkhan commented 3 years ago

Yeah, switching to .Net 4.x compatibility worked for me. Thank you all

dhaminitinAltran commented 3 years ago

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)

Thanks, @Khan-amil this worked for me as well for anyone searching this issue, I was on unity 2019.4.4f1

ROBYER1 commented 3 years ago

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.

andresmqa commented 2 years ago

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.

Your solution could be useful, but I don't have 2018.x unity editor, maybe have I to install it to get that files?

ROBYER1 commented 2 years ago

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.

Your solution could be useful, but I don't have 2018.x unity editor, maybe have I to install it to get that files?

Or newer, probably. Just try it.

gaojinjin commented 2 years ago

unity v: 2020.3.32 change PlayerSetting >other setting>scripting backend> IL2CPP to PlayerSetting >other setting>scripting backend> Mono