Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

BUILD ERROR- Assembly -CSharp-firstpass.dll Could Not Be Found [HoloLens]

Discussion in 'VR' started by yashk1, Aug 15, 2017.

  1. yashk1

    yashk1

    Joined:
    Feb 10, 2017
    Posts:
    13
    Hi all,
    I am trying to build the example HoloLens project (tutorial here). I want to use the HoloLens Emulator to deploy and test this project.
    When I try to deploy the solution to the Emulator using Visual Studio 2017, I get the following errors:


    Code (CSharp):
    1. Severity    Code    Description    Project    File    Line    Suppression State
    2. Error    CS0006    Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found    Assembly-CSharp    D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp\CSC    1    Active
    3. Error    CS0006    Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found    ARH2    D:\ARH2\App\ARH2\CSC    1    Active
    4. Error    CS0006    Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found    ARH2    D:\ARH2\App\ARH2\CSC    1    Active
    5. Error        The command ""D:\ARH2\App\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll" "-pdb" "-verbose" "-unity-engine=D:\ARH2\App\ARH2\Unprocessed\UnityEngine.dll" "D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\obj\x86\Release\x86\Release" "-lock=D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\project.lock.json" "@D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\SerializationWeaverArgs.txt" "-additionalAssemblyPath=D:\ARH2\App\ARH2\Unprocessed" "-unity-networking=D:\ARH2\App\ARH2\Unprocessed\UnityEngine.Networking.dll"" exited with code 1.    Assembly-CSharp-firstpass    D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj    196  
    6.  
    And the following in the 'Output' tab:
    Code (CSharp):
    1. Restoring NuGet packages...
    2. To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
    3. 1>------ Build started: Project: Assembly-CSharp-firstpass, Configuration: Release x86 ------
    4. 1>  Running SerializationWeaver...
    5. 1>  System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
    6. 1>     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    7. 1>     at UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve()
    8. 1>     at Unity.NuGetAssemblyResolver..ctor(String projectLockFile)
    9. 1>     at usw.Weaver.ReaderParameters(String assemblyPath, ConversionOptions options)
    10. 1>     at usw.Weaver.Weave()
    11. 1>     at usw.Program.RunProgram(ConversionOptions options)
    12. 1>     at usw.Program.Main(String[] args)
    13. 1>D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj(196,5): error MSB3073: The command ""D:\ARH2\App\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll" "-pdb" "-verbose" "-unity-engine=D:\ARH2\App\ARH2\Unprocessed\UnityEngine.dll" "D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\obj\x86\Release\x86\Release" "-lock=D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\project.lock.json" "@D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\SerializationWeaverArgs.txt" "-additionalAssemblyPath=D:\ARH2\App\ARH2\Unprocessed" "-unity-networking=D:\ARH2\App\ARH2\Unprocessed\UnityEngine.Networking.dll"" exited with code 1.
    14. 2>------ Build started: Project: Assembly-CSharp, Configuration: Release x86 ------
    15. 2>CSC : error CS0006: Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found
    16. 3>------ Build started: Project: ARH2, Configuration: Release x86 ------
    17. 3>CSC : error CS0006: Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found
    18. 3>CSC : error CS0006: Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found
    19. ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
    20. ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
    21.  
    I have used Unity 5.6.1f1, Unity 2017.1.0f3 and Unity 2017.1.0p3. I have removed and rebuilt the .sln file multiple times, even created multiple projects from scratch. The issue persists. I have looked at threads / solutions here, here and here and tried those but the issue is still there. Apparently I am doing something very wrong, because I have removed and reinstalled Unity, Visual Studio multiple times, I have renamed the project folder to not contain any spaces, I have tried to make the directory path shorter, put it closer to the root etc etc. What should I do to fix this issue?
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
  3. yashk1

    yashk1

    Joined:
    Feb 10, 2017
    Posts:
    13
    Yes, I will try to use VS2015 and see if I can build correctly. Does it work for you?
    Edit: Aside from the error mentioned in your post, I see those three additional errors as I wrote:
    Code (CSharp):
    1. Error    CS0006    Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found    Assembly-CSharp    D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp\CSC    1    Active
    2. Error    CS0006    Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found    ARH2    D:\ARH2\App\ARH2\CSC    1    Active
    3. Error    CS0006    Metadata file 'D:\ARH2\App\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found    ARH2    D:\ARH2\App\ARH2\CSC    1    Active
     
    Last edited: Aug 15, 2017
  4. yashk1

    yashk1

    Joined:
    Feb 10, 2017
    Posts:
    13
    Well, if I try to open the sln file in VS 2015, it is asking me to update:
    .
    I cannot find this particular version, and acoording to this post, I need to get VS 2017 to ensure compatibility with Windows 10 Creators Update - which I already have and don't want to use.
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    9,021
    In the Unity build window, select a Windows SDK that is order than 10.0.15063 - like 10.0.14393. VS 2015 does not support SDK 15063.
     
  6. yashk1

    yashk1

    Joined:
    Feb 10, 2017
    Posts:
    13
    Thank you. It finally worked with VS 2015 and Windows SDK 10.0.14393
     
  7. gsnagi

    gsnagi

    Joined:
    Sep 10, 2017
    Posts:
    1
    I am facing the same problem and unable to resolve since 3 days, i have used Unity 5.6.1f1, Unity 5.6.2f1, Unity 2017.1.0f3 and Unity 2017.1.0p3 and the new Unity 2017.2.0b10 (64-bit). I have removed and rebuilt the .sln file multiple times, even created multiple projects from scratch. The issue persists.

    I have looked at threads / solutions here, and other forums and tried those but the issue is still there. 1 thing is for sure that i am not doing correct settings or something is very wrong, because I have reinstalled Unity, Visual Studio.

    Finally it worked with VS 2015 SP3 and Windows SDK 10.0.14393
     
  8. nairu777

    nairu777

    Joined:
    Sep 7, 2017
    Posts:
    4
    You could also use a combination of VS 2017 and Unity 2017 beta
     
  9. dbarrett

    dbarrett

    Joined:
    Sep 6, 2017
    Posts:
    32
    If you import the Holotoolkit package, you should see a tab at the top of the unity editor that says "Holotoolkit" and it will set the settings for you automatically. Holotoolkit -> configure and click on all of the different settings.
     
  10. nairu777

    nairu777

    Joined:
    Sep 7, 2017
    Posts:
    4
    I imported the MRtoolkit-Unity but it does not show a "Holotoolkit"-tab

    Details:
    I'm using Unity 2017.2.0b11 and Mixed Reality Toolkit Unity dev 2017.2.0
     
  11. dbarrett

    dbarrett

    Joined:
    Sep 6, 2017
    Posts:
    32
    That's Interesting. I'm running 2017.1 and the same toolkit and I have a tab at the top in between window and component that says HoloToolkit. The toolkit might not be completely compatible with the beta I'm not sure.
     
unityunity