Search Unity

Build Error - Assembly-CSharp.dll' could not be found [HoloLens]

Discussion in 'VR' started by Vern_Shurtz, Feb 27, 2017.

  1. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    I created a test project to troubleshoot a build error. Using Unity 5.5.1f. I set up the project to build for Hololens and add Playmaker 1.8.3 which I have used on all of my Hololens projects without issue. Project builds and runs on Hololens.

    Add a simple ugui canvas with a button and slider. Add Playmakers ugui proxy add on and there was an issue compiling. There was a line of code with an issue and the Playmaker Forum Admin helped troubleshoot. The line of code and it's replacement are to follow;

    Code (CSharp):
    1.  }else if(valueType.BaseType == typeof(System.Enum) ){
    2.  
    3. Replaced with
    4.  
    5. }else if(value is System.Enum){
    After this edit the scene ran fine in the Unity editor and was able to build a solution vor VS.

    When building the solution in Visual Studio I get the following errors.

    Severity Code Description Project File Line Suppression State
    Error CS0006 Metadata file 'D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found


    Severity Code Description Project File Line Suppression State
    Error The command ""D:\Test\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.dll" -pdb -verbose -unity-engine="D:\Test\uguitest\Unprocessed\UnityEngine.dll" -unity-networking="D:\Test\uguitest\Unprocessed\UnityEngine.Networking.dll" -additionalAssemblyPath="D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release" "D:\Test\GeneratedProjects\UWP\Assembly-CSharp\obj\x86\Release\x86\Release"" exited with code 1.

    I have seen many threads with similar errors. Is there a set way to resolve this issue?

    Here is a link to the Playmaker Forums about this issue.

    Thanks,
     
  2. Subere023

    Subere023

    Joined:
    Apr 27, 2016
    Posts:
    47
    When this happens,in my experience deleting my sln files and re build from unity fixes it
     
    CptMcToast and azporispo like this.
  3. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Did not work for me... Thank you for the suggestion.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Can you paste the contents of the "output" window in Visual Studio when this happens?
     
  5. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Here it is.

    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>  Symbols will be read from D:\Test\uguitest\Unprocessed\UnityEngine.pdb
    6. 1>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.pdb
    7. 1>  WeaveAssemblies unityPath= D:\Test\uguitest\Unprocessed\UnityEngine.dll
    8. 1>  WeaveAssemblies unetPath= D:\Test\uguitest\Unprocessed\UnityEngine.Networking.dll
    9. 1>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.pdb
    10. 1>  Script Module: Assembly-CSharp-firstpass.dll
    11. 1>  Pass: 0 took 0 milliseconds
    12. 1>  Pass: 1 took 2 milliseconds
    13. 1>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.pdb
    14. 1>  Weaving assembly D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll
    15. 1>  Will export symbols of pdb format
    16. 1>  SerializationWeaver done.
    17. 1>  Assembly-CSharp-firstpass -> D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll
    18. 2>------ Build started: Project: Assembly-CSharp, Configuration: Release x86 ------
    19. 2>D:\HololensProjects\uguitest\Assets\PlayMaker\Actions\Animator\GetAnimatorDelta.cs(24,21,24,31): warning CS0169: The field 'GetAnimatorDelta._transform' is never used
    20. 2>D:\HololensProjects\uguitest\Assets\PlayMaker uGui\Proxies\PlayMakerUGuiComponentProxy.cs(48,9,48,14): warning CS0169: The field 'PlayMakerUGuiComponentProxy.error' is never used
    21. 2>D:\HololensProjects\uguitest\Assets\PlayMaker Custom Actions\uGui\Selectable\uGuiNavigationGetMode.cs(36,40,36,59): warning CS0169: The field 'uGuiNavigationGetMode._originalTransition' is never used
    22. 2>D:\HololensProjects\uguitest\Assets\PlayMaker uGui\Proxies\PlayMakerUGuiComponentProxy.cs(65,9,65,21): warning CS0169: The field 'PlayMakerUGuiComponentProxy.fsmIntTarget' is never used
    23. 2>D:\HololensProjects\uguitest\Assets\PlayMaker Custom Actions\uGui\Selectable\uGuiGetIsInteractable.cs(28,8,28,22): warning CS0169: The field 'uGuiGetIsInteractable._originalState' is never used
    24. 2>D:\HololensProjects\uguitest\Assets\PlayMaker\Actions\SetFsmVariable.cs(31,32,31,46): warning CS0169: The field 'SetFsmVariable.sourceVariable' is never used
    25. 2>D:\HololensProjects\uguitest\Assets\PlayMaker Custom Actions\uGui\Selectable\uGuiTransitionGetType.cs(33,40,33,59): warning CS0169: The field 'uGuiTransitionGetType._originalTransition' is never used
    26. 2>D:\HololensProjects\uguitest\Assets\PlayMaker Custom Actions\uGui\uGuiDropDownClearOptions.cs(23,44,23,52): warning CS0169: The field 'uGuiDropDownClearOptions._options' is never used
    27. 2>D:\HololensProjects\uguitest\Assets\iTween\iTween.cs(74,15,74,24): warning CS0169: The field 'iTween.kinematic' is never used
    28. 2>D:\HololensProjects\uguitest\Assets\PlayMaker\Actions\Animator\AnimatorCrossFade.cs(31,15,31,23): warning CS0169: The field 'AnimatorCrossFade._paramID' is never used
    29. 2>  Running SerializationWeaver...
    30. 2>  Symbols will be read from D:\Test\uguitest\Unprocessed\UnityEngine.pdb
    31. 2>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
    32. 2>  WeaveAssemblies unityPath= D:\Test\uguitest\Unprocessed\UnityEngine.dll
    33. 2>  WeaveAssemblies unetPath= D:\Test\uguitest\Unprocessed\UnityEngine.Networking.dll
    34. 2>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
    35. 2>  Script Module: Assembly-CSharp.dll
    36. 2>  Pass: 0 took 11 milliseconds
    37. 2>  Pass: 1 took 20 milliseconds
    38. 2>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
    39. 2>  Weaving assembly D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.dll
    40. 2>   + iTween
    41. 2>   + PlayMakerUGuiCanvasRaycastFilterEventsProxy
    42. 2>   + PlayMakerUGuiComponentProxy/FsmVariableSetup
    43. 2>   + PlayMakerUGuiComponentProxy/FsmEventSetup
    44. 2>   + PlayMakerUGuiComponentProxy
    45. 2>   + PlayMakerUGuiDragEventsProxy
    46. 2>   + PlayMakerUGuiDropEventsProxy
    47. 2>   + PlayMakerUGuiPointerEventsProxy
    48. 2>   + PlayMakerUGuiSceneProxy
    49. 2>   + IncrementRenderQueue
    50. 2>   + PlayMakerRPCProxy
    51. 2>   + TrackMouseMovement
    52. 2>   + iTweenFSMEvents
    53. 2>   + RadialLayout
    54. 2>   + InputNavigator
    55. 2>   + HutongGames.PlayMaker.Ecosystem.utils.Comment
    56. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.TransformEventsBridge
    57. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.Owner
    58. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerEventTarget
    59. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerEvent
    60. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerFsmTarget
    61. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerFsmVariableTarget
    62. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerFsmVariable
    63. 2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerEventProxy
    64. 2>  Will export symbols of pdb format
    65. 2>  Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Reflection.TypeExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    66. 2>     at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
    67. 2>     at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
    68. 2>     at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
    69. 2>     at Mono.Cecil.TypeReference.Resolve()
    70. 2>     at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
    71. 2>     at Mono.Cecil.MetadataBuilder.GetConstantType(TypeReference constant_type, Object constant)
    72. 2>     at Mono.Cecil.MetadataBuilder.AddConstant(IConstantProvider owner, TypeReference type)
    73. 2>     at Mono.Cecil.MetadataBuilder.AddParameter(UInt16 sequence, ParameterDefinition parameter, ParamTable table)
    74. 2>     at Mono.Cecil.MetadataBuilder.AddParameters(MethodDefinition method)
    75. 2>     at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
    76. 2>     at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
    77. 2>     at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
    78. 2>     at Mono.Cecil.MetadataBuilder.AddTypeDefs()
    79. 2>     at Mono.Cecil.MetadataBuilder.BuildTypes()
    80. 2>     at Mono.Cecil.MetadataBuilder.BuildModule()
    81. 2>     at Mono.Cecil.ModuleWriter.<BuildMetadata>b__0(MetadataBuilder builder, MetadataReader _)
    82. 2>     at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
    83. 2>     at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
    84. 2>     at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
    85. 2>     at usw.Weaver.WeaveAssembly(String assemblyPath, AssemblyDefinition unityEngineAssemblyDefinition, ReaderParameters readerParameters)
    86. 2>     at usw.Weaver.Weave()
    87. 2>     at usw.Program.RunProgram(ConversionOptions options)
    88. 2>     at usw.Program.Main(String[] args)
    89. 2>D:\Test\GeneratedProjects\UWP\Assembly-CSharp\Assembly-CSharp.csproj(189,5): error MSB3073: The command ""D:\Test\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.dll" -pdb -verbose -unity-engine="D:\Test\uguitest\Unprocessed\UnityEngine.dll" -unity-networking="D:\Test\uguitest\Unprocessed\UnityEngine.Networking.dll" -additionalAssemblyPath="D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release" "D:\Test\GeneratedProjects\UWP\Assembly-CSharp\obj\x86\Release\x86\Release"" exited with code 1.
    90. 3>------ Build started: Project: uguitest, Configuration: Release x86 ------
    91. 3>CSC : error CS0006: Metadata file 'D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found
    92. ========== Build: 1 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
    93.  
     
  6. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    I have been in touch with the Playmaker Forum Admin, Jean, and he is trying to understand what is going on to fix if the issue is on that end. Any help would be greatly appreciated.
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    If you build from Unity without "C# projects" option checked, does it work and not print this error? This is very likely to have nothing to do with playmaker and instead is an issue within Unity. Could we get a bug report on this?
     
  8. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    My Playmaker ugui test for Hololens without C# Projects selected builds in Visual Studio, installs and runs on the Hololens without issue. I thought having C# Project selected was a requirement for Hololens. Is it only necessary if further development in Visual Studio is needed?

    I'll submit a bug report shortly.

    Thank you for your assistance.
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    It's not a requirement at all - it's just there for your convenience. Once you submit the bug report, could you tell me the 6 digit case number? Don't post the link, just the case number.
     
  10. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Here is the case number.

    (Case 885997) Building Project for Hololens with C# Project selected will cause Visual Studio build to fail

    I will be doing a lot of testing of Playmaker with the uGui Proxy and Hololens over the next few days. I will report back on how it goes.

    Thank you very much for your assistance. :)
     
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Thanks. I received the bug report and looked into it. It's indeed a bug in our C# project generation - we generate the command line invocation for Serialization Weaver incorrectly. I fixed it and I'll be backporting the fix to oncoming patch releases.
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Hey, just wanted to let you know that the fix for this issue landed to 5.5.3p1 :).
     
  13. soulburner

    soulburner

    Joined:
    Mar 25, 2012
    Posts:
    169
    Does it apply to Unity 5.6 ?
     
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    It should land in the first patch release of 5.6. I fixed a bit too late to put it into 5.6.
     
  15. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Thank you for the update.
     
  16. mrana87

    mrana87

    Joined:
    May 19, 2017
    Posts:
    1
    Hi,

    Is there any workaround for this error?? I am struggling to fix this for 5 hrs. Someone please give the solution. I am using unity 5.6 and deploying it on HoloLens emulator
     
  17. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    What version of 5.6? I'm using 5.6.1f1 on my laptop and don't get the error at all, it all works perfectly.
     
  18. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Yeah this has landed in one of the already released unity 5.6 patch releases.
     
  19. woozie

    woozie

    Joined:
    Feb 7, 2014
    Posts:
    2
    I had this issue in 5.6.1f1. It was fixed by removing using NUnit.Framework from one of my MonoBehavior scripts.

    Not the same error as the original poster, but I landed here where I googled this error.
     
  20. foluis

    foluis

    Joined:
    Aug 5, 2017
    Posts:
    1
  21. alphabeta314

    alphabeta314

    Joined:
    Jul 23, 2015
    Posts:
    47
    I also have this exact problem in Unity 2017.1.0b7 Personal 64bit

    Severity Code Description Project File Line Suppression State
    Error CS0006 Metadata file 'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Debug\Assembly-CSharp-firstpass.dll' could not be found Assembly-CSharp C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp\CSC 1 Active
    Error CS0006 Metadata file 'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Debug\Assembly-CSharp-firstpass.dll' could not be found Virtual Mine C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\Virtual Mine\CSC 1 Active
    Error CS0006 Metadata file 'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Debug\Assembly-CSharp.dll' could not be found Virtual Mine C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\Virtual Mine\CSC 1 Active
    Error The command ""C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Debug\Unprocessed\Assembly-CSharp-firstpass.dll" "-pdb" "-verbose" "-unity-engine=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\Virtual Mine\Unprocessed\UnityEngine.dll" "C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp-firstpass\obj\x86\Debug\x86\Debug" "-lock=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp-firstpass\project.lock.json" "@C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp-firstpass\SerializationWeaverArgs.txt" "-additionalAssemblyPath=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\Virtual Mine\Unprocessed" "-unity-networking=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\Virtual Mine\Unprocessed\UnityEngine.Networking.dll"" exited with code 1. Assembly-CSharp-firstpass C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app2\GeneratedProjects\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj 196
     
  22. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    2017.1 has been released. Why are you still using the beta?
     
  23. alphabeta314

    alphabeta314

    Joined:
    Jul 23, 2015
    Posts:
    47
    I've now downloaded 2017.1.0f3 and still have exact same issue...
     
  24. alphabeta314

    alphabeta314

    Joined:
    Jul 23, 2015
    Posts:
    47
  25. alphabeta314

    alphabeta314

    Joined:
    Jul 23, 2015
    Posts:
    47
    I did a search and found an Assembly-CSharp-firstpass.dll , its not where VStudio is looking for it, its in a "unprocessed" directory under where its looking for...
    So this error....
    Error CS0006 Metadata file 'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found

    The dll is in
    'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\

    One other odd thing I've noticed is I have the same version of unity on another desktop, it builds and deploys fine on that machine. I note the one which fails has 'holotoolkit' menu, and one which works does not
     
    Last edited: Aug 17, 2017
  26. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Can you post the contents of the "output" window?
     
  27. alphabeta314

    alphabeta314

    Joined:
    Jul 23, 2015
    Posts:
    47
    Restoring NuGet packages...
    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.'
    1>------ Build started: Project: Assembly-CSharp-firstpass, Configuration: Debug x86 ------
    1> Running SerializationWeaver...
    1> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
    1> at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    1> at UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve()
    1> at Unity.NuGetAssemblyResolver..ctor(String projectLockFile)
    1> at usw.Weaver.ReaderParameters(String assemblyPath, ConversionOptions options)
    1> at usw.Weaver.Weave()
    1> at usw.Program.RunProgram(ConversionOptions options)
    1> at usw.Program.Main(String[] args)
    1>C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj(196,5): error MSB3073: The command ""C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Debug\Unprocessed\Assembly-CSharp-firstpass.dll" "-pdb" "-verbose" "-unity-engine=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\Virtual Mine\Unprocessed\UnityEngine.dll" "C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\obj\x86\Debug\x86\Debug" "-lock=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\project.lock.json" "@C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\SerializationWeaverArgs.txt" "-additionalAssemblyPath=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\Virtual Mine\Unprocessed" "-unity-networking=C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\Virtual Mine\Unprocessed\UnityEngine.Networking.dll"" exited with code 1.
    2>------ Build started: Project: Assembly-CSharp, Configuration: Debug x86 ------
    2>CSC : error CS0006: Metadata file 'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Debug\Assembly-CSharp-firstpass.dll' could not be found
    3>------ Build started: Project: Virtual Mine, Configuration: Debug x86 ------
    3>CSC : error CS0006: Metadata file 'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Debug\Assembly-CSharp-firstpass.dll' could not be found
    3>CSC : error CS0006: Metadata file 'C:\Users\user\Desktop\HoloMine\Keylogic_VirtualMine\app\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Debug\Assembly-CSharp.dll' could not be found
    ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
  29. alphabeta314

    alphabeta314

    Joined:
    Jul 23, 2015
    Posts:
    47
    AHHH! I see, so we have to do a
    for /r %F in (*.lock.json) do @(type "%F"|repl "v10.0.10240" "v10.0" >"%F.new"&move /y "%F.new" "%F" L >nul)
    batch script on the dir just above the build directory to replace all v10.0.10240's with v10.0's
     
  30. LexieMeng

    LexieMeng

    Joined:
    Aug 14, 2017
    Posts:
    1
  31. saurabh_cv

    saurabh_cv

    Joined:
    Aug 20, 2017
    Posts:
    2
    Does it work or do we have to downgrade Visual Studio ?
     
  32. Deleted User

    Deleted User

    Guest

    Same here, updated VS 2017 to version 15.3.2. Updated (reinstall) Unity to 2017.1.0f3. Now I get the following errors:

    Restoring NuGet packages...
    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.'
    1>------ Build started: Project: Assembly-CSharp-firstpass, Configuration: Release x86 ------
    1> Running SerializationWeaver...
    1> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
    1> at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    1> at UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve()
    1> at Unity.NuGetAssemblyResolver..ctor(String projectLockFile)
    1> at usw.Weaver.ReaderParameters(String assemblyPath, ConversionOptions options)
    1> at usw.Weaver.Weave()
    1> at usw.Program.RunProgram(ConversionOptions options)
    1> at usw.Program.Main(String[] args)
    1>C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj(196,5): error MSB3073: The command ""C:\Users\...\App\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll" "-pdb" "-verbose" "-unity-engine=C:\Users\...\App\Shooter\Unprocessed\UnityEngine.dll" "C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\obj\x86\Release\x86\Release" "-lock=C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\project.lock.json" "@C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\SerializationWeaverArgs.txt" "-additionalAssemblyPath=C:\Users\...\App\Shooter\Unprocessed" "-unity-networking=C:\Users\...\App\Shooter\Unprocessed\UnityEngine.Networking.dll"" exited with code 1.
    2>------ Build started: Project: Assembly-CSharp, Configuration: Release x86 ------
    2>CSC : error CS0006: Metadata file 'C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found
    3>------ Build started: Project: Shooter, Configuration: Release x86 ------
    3>CSC : error CS0006: Metadata file 'C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found
    3>CSC : error CS0006: Metadata file 'C:\Users\...\App\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found
    ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
     
  33. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    ^ that's the same issue ericalbers hit.
     
  34. sebrk_hiq

    sebrk_hiq

    Joined:
    Jul 10, 2017
    Posts:
    23
    I have both mentioned issues with 5.6.3f1. I've tried with both VS2015 and VS2017. VS2017 stops at the SerializationWeaver exception. VS2017 cannot find Assembly-CSharp.dll. Are both these issues fixed in upcoming release?
     
  35. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    What error are you seeing with VS2015? AFAIK that should be working correctly.
     
  36. sebrk_hiq

    sebrk_hiq

    Joined:
    Jul 10, 2017
    Posts:
    23
    Same as above. It started to not find Assembky-CSharo.dll. Anyway I got VS2017 working after upgrading my project and dependencies instead.
     
  37. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    How did you get this working?
     
  38. Force_of_Bullet

    Force_of_Bullet

    Joined:
    Sep 7, 2017
    Posts:
    1
    The problem "Metadata file 'E:\UnityProjects\You\Temp\UnityVS_bin\Debug\Assembly-CSharp.dll' could not be found You Win.CSharp.Editor" happens to me too. But the reason was that Unity create a CSharp script with the same name. When I delete the twin file the error dissapers.
    I hope it helps!
     
  39. WillWinstone

    WillWinstone

    Joined:
    Oct 9, 2017
    Posts:
    2
    I have the same troubles . And I could not fix it for several days. So I reinstall win10,and reinstall VS and Unity. Then the sln files runs on VS without errors . HoloLens Emulator works well.
    The sln file of my project could not run on VS because I deleted some folders in C drive 【C:\Program Files (x86)\Windows Kits】, as follow picture.
    20171010211120.jpg
    BEFOR I delete the folder 【NETFXSDK】 sln file runs well on VS , but when I deleted it the errors occurred in Error list of VS, and the sln file failed to run.
    Hope that these are helpful to you.;)
     
  40. Barbucck

    Barbucck

    Joined:
    Nov 16, 2016
    Posts:
    1
    In VS (2015), go to the project dependencies (right click on the Solution -> Project Dependencies), and check Assembly-CSharp and Assembly-CSharp-firstpass.

    Worked for me.

    I hope this will help you :)
     

    Attached Files:

  41. longma8520

    longma8520

    Joined:
    Nov 17, 2016
    Posts:
    2
     
  42. denniscw

    denniscw

    Joined:
    Mar 16, 2018
    Posts:
    2
    Hi
    I also encountered similar issue recently after upgrading Unity from 5.6.1f1 to 2017.3.1. My Visual Studio 2017 version is 15.6.2.
    Supposedly my unity and Visual Studio should be immune to this issue since both versions are later than the original post.
    I also try the workaround on this link, but my NuGet package Manager setting has been checked correctly.
    http://www.imaginativeuniversal.com/blog/2017/06/24/hololens-fix-visual-studio-2017-build-error/
    May I know what I should do to solve it? Will it work if I downgrade to VS 2015?

    Severity Code Description Project File Line Suppression State
    Error The command ""J:\Summer Unity\align\app\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "J:\Summer Unity\align\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll" "-pdb" "-verbose" "-unity-engine=J:\Summer Unity\align\app\align\Unprocessed\UnityEngine.dll" "J:\Summer Unity\align\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\obj\x86\Release\x86\Release" "-lock=J:\Summer Unity\align\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\project.lock.json" "@J:\Summer Unity\align\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\SerializationWeaverArgs.txt" "-additionalAssemblyPath=J:\Summer Unity\align\app\align\Unprocessed" "-unity-networking=J:\Summer Unity\align\app\align\Unprocessed\UnityEngine.Networking.dll"" exited with code 1. Assembly-CSharp-firstpass J:\Summer Unity\align\app\GeneratedProjects\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj 200
     
  43. LOBLAW

    LOBLAW

    Joined:
    Sep 25, 2018
    Posts:
    2
    Hi,

    I'm still having this problem with Unity 2018.2.7f1 and VS Pro 201715.8.3

    The following is what shows on my error list.

    Severity Code Description Project File Line Suppression State Error CS0006
    Metadata file 'C:\Users\yizhong\Documents\HolographicAcademy-Holograms-230-SpatialMapping\HolographicAcademy-Holograms-230-SpatialMapping\Starting\230Test\App\230Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Debug\Assembly-CSharp.dll' could not be found 230Test C:\Users\yizhong\Documents\HolographicAcademy-Holograms-230-SpatialMapping\HolographicAcademy-Holograms-230-SpatialMapping\Starting\230Test\App\230Test\230Test\CSC 1 Active

    I've tried a few workarounds (except downgrading) but still having the problem. Any ideas?

    Thanks.
     
  44. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    ^ The error you pasted is incomplete. Please paste the contents of the "Output" window in VS.
     
  45. LOBLAW

    LOBLAW

    Joined:
    Sep 25, 2018
    Posts:
    2
    1>------ Build started: Project: Unity.TextMeshPro, Configuration: Debug x86 ------
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3101: Could not write state file "obj\x86\Debug\x86\Debug\Unity.TextMeshPro.csprojAssemblyReference.cache". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3430,5): error MSB3491: Could not write lines to file "obj\x86\Debug\x86\Debug\Unity.TextMeshPro.csproj.CoreCompileInputs.cache". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(5088,5): error MSB3491: Could not write lines to file "obj\x86\Debug\x86\Debug\Unity.TextMeshPro.csproj.FileListAbsolute.txt". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    2>------ Build started: Project: Assembly-CSharp, Configuration: Debug x86 ------
    2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3430,5): error MSB3491: Could not write lines to file "obj\x86\Debug\x86\Debug\Assembly-CSharp.csproj.CoreCompileInputs.cache". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    3>------ Build started: Project: 230Test, Configuration: Debug x86 ------
    3>CSC : error CS0006: Metadata file 'C:\Users\yizhong\Documents\HolographicAcademy-Holograms-230-SpatialMapping\HolographicAcademy-Holograms-230-SpatialMapping\Starting\230Test\App\230Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Debug\Assembly-CSharp.dll' could not be found
    3>CSC : error CS0006: Metadata file 'C:\Users\yizhong\Documents\HolographicAcademy-Holograms-230-SpatialMapping\HolographicAcademy-Holograms-230-SpatialMapping\Starting\230Test\App\230Test\GeneratedProjects\UWP\Unity.TextMeshPro\bin\x86\Debug\Unity.TextMeshPro.dll' could not be found
    ========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
     
  46. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Did you try building to a shorter path? The error is quite obvious:

    Code (csharp):
    1. The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
     
  47. clarHandsome

    clarHandsome

    Joined:
    Mar 26, 2017
    Posts:
    9
  48. wuy420

    wuy420

    Joined:
    Apr 22, 2019
    Posts:
    17
    Hi, I run into the same problem when I deployed to my HoloLens. I'm using unity 2018.4.8f1. In the beginning I didn't applied any C# script to any components and it worked fine. Then I had this error when I applied the script to my cursor. I'm using the code from Microsoft tutorial.

    using UnityEngine;
    public class WorldCursor : MonoBehaviour
    {
    private MeshRenderer meshRenderer;
    // Use this for initialization
    void Start()
    {
    // Grab the mesh renderer that's on the same object as this script.
    meshRenderer = this.gameObject.GetComponentInChildren<MeshRenderer>();
    }
    // Update is called once per frame
    void Update()
    {
    // Do a raycast into the world based on the user's
    // head position and orientation.
    var headPosition = Camera.main.transform.position;
    var gazeDirection = Camera.main.transform.forward;
    RaycastHit hitInfo;
    if (Physics.Raycast(headPosition, gazeDirection, out hitInfo))
    {
    // If the raycast hit a hologram...
    // Display the cursor mesh.
    meshRenderer.enabled = true;
    // Move the cursor to the point where the raycast hit.
    this.transform.position = hitInfo.point;
    // Rotate the cursor to hug the surface of the hologram.
    this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal);
    }
    else
    {
    // If the raycast did not hit a hologram, hide the cursor mesh.
    meshRenderer.enabled = false;
    }
    }
    }

    upload_2019-9-9_21-22-55.png
     
  49. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,679
    Can you paste the contents of Visual Studio output window?