Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity won't build any projects at all. Missing DLL?

Discussion in 'Windows' started by difficultnerd, Jan 3, 2018.

  1. difficultnerd

    difficultnerd

    Joined:
    May 3, 2014
    Posts:
    52
    When I try to build any project in Unity 2017.3.0f3 on Windows 10, I get three errors in the Console and no build:

    The first is:
    Code (JavaScript):
    1. ArgumentException: The Assembly UnityEngine is referenced by UnityEngine.UI ('C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Standalone/UnityEngine.UI.dll'). But the dll is not allowed to be included or could not be found.
    2. 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:156)
    3. UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, BuildTarget target) (at C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:196)
    4. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    The second is:
    Code (JavaScript):
    1. Build completed with a result of 'Failed'
    2. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    3.  
    The third is:
    Code (CSharp):
    1. UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    2.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
    3.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
    4. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    This is happening on a two-week old Alienware 13r3 with nvidia gtx 1060 and Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz; 16gb ram; Intel(R) HD Graphics 630; Windows 10.

    I've tried uninstalling and reinstalling Unity. I've also tried reinstalling Windows. This occurs on an entirely empty project, more complex scenes and happens all the time. Any ideas?
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Can you post the full editor log?
     
  3. difficultnerd

    difficultnerd

    Joined:
    May 3, 2014
    Posts:
    52
    I've uploaded the editor.log file - had to give it a new extension on account of the forums' security settings. To make sure it is easy to read I deleted the old file, launched Unity, opened the Empty project, went to build and run and tried to build the project. As you can see, the build was not successful.
     

    Attached Files:

  4. difficultnerd

    difficultnerd

    Joined:
    May 3, 2014
    Posts:
    52
    Is there any other information I can supply, or any other ideas I can try to get a build to work?
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    Does this file ("<UNITY_INSTALL_DIR>\Editor\Data\PlaybackEngines\windowsstandalonesupport\Managed\UnityEngine.dll") exist? Did you install Unity using Unity Download Assistant?
     
  6. difficultnerd

    difficultnerd

    Joined:
    May 3, 2014
    Posts:
    52
    Yes, I did install using the download assistant from https://store.unity.com/download?ref=personal - and I've reinstalled Windows and did it from there again last night. And, running Unity as administrator makes no difference which implies that it's not a permissions problem. Although, I set all account types to have full control over that entire directory to see.

    Here is a screenshot showing those files in that location
    Unity dll.PNG
     
  7. difficultnerd

    difficultnerd

    Joined:
    May 3, 2014
    Posts:
    52
    The solution that worked for me came from the Unity community -

    Delete the file C:\ProgramData\Unity\index-local.xml while Unity isclosed, reopened the project, and tried to build again.

    This machine now builds. Thank goodness.

    I have attached the index-local and the old index-local for Unity's purposes. Near as I can tell, the only difference is the order of entries.
     

    Attached Files:

  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,646
    I'm super glad you found the solution. Also, thanks for posting these files - they might help us figure out what went wrong.
     
    difficultnerd likes this.
  9. difficultnerd

    difficultnerd

    Joined:
    May 3, 2014
    Posts:
    52
    it was very frustrating - but thanks for your help - now I can get back to finding my frame rate problem :)
     
  10. axelstrem

    axelstrem

    Joined:
    Jan 19, 2018
    Posts:
    1
    Thank you so much difficultnerd - I had the same problem and your solution worked for me.

    Not sure if that can be of any help, but for me the problem appeared when I switched the build to Android and then back to Windows.
     
  11. mickyfx

    mickyfx

    Joined:
    Apr 1, 2015
    Posts:
    6
    Hi, I've the same issue, where can I find index-local.xml on a mac?

    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:187
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:94
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Sep 2, 2018
  12. brinca

    brinca

    Joined:
    Mar 29, 2015
    Posts:
    33
    @mickyfx where you able to find the file on Mac, and/or sort the problem?

    I'm having the same issue trying to build in Linux, and can't find that file either (what'ts weird is that the same project builds just fine on Mac and Windows...)