- Home /
application works in editor but when building the application i get an error ,why does my application run in the editor but when i try to build it as a windows application i'm getting errors
hey, guys, I am building an application for windows and android, the application works fine in the editor but when I try to build the application for windows I get three errors (I haven't tried to build for Android). I don't know why I am getting this error for the first error I checked my plugins folder the UnityEditor .dll file is present, I don't know why I'm still getting this error. thanks in advance.
ArgumentException: The Assembly Unity.Cecil is referenced by UnityEditor ('Assets/Plugins/UnityEditor.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 C:/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 C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:156) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:190) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
,I'm getting these three errors when I try to build the application. ArgumentException: The Assembly Unity.Cecil is referenced by UnityEditor ('Assets/Plugins/UnityEditor.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 C:/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 C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:156) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:190) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Build completed with a result of 'Failed' UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
Answer by AdrienA · Nov 04, 2020 at 04:10 PM
The Assembly Unity.Cecil is another assembly (only available in Editor) that is not included in UnityEditor.dll. You can find it in Library\ScriptAssemblies\Unity.Cecil.dll if you want to add it in your plugin to make it available in your build.
Your answer
Follow this Question
Related Questions
Dll is not allowed or could not be found 0 Answers
build exe with opencvsharp / dll missing / FileNotFoundException 0 Answers
DLL plugins unsupported for Android Application Building 0 Answers
Error building Player: Extracting referenced dlls failed. 1 Answer
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers