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

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;

 }else if(valueType.BaseType == typeof(System.Enum) ){

Replaced with

}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,

When this happens,in my experience deleting my sln files and re build from unity fixes it

2 Likes

Did not work for me… Thank you for the suggestion.

Can you paste the contents of the “output” window in Visual Studio when this happens?

Here it is.

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>  Symbols will be read from D:\Test\uguitest\Unprocessed\UnityEngine.pdb
1>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.pdb
1>  WeaveAssemblies unityPath= D:\Test\uguitest\Unprocessed\UnityEngine.dll
1>  WeaveAssemblies unetPath= D:\Test\uguitest\Unprocessed\UnityEngine.Networking.dll
1>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.pdb
1>  Script Module: Assembly-CSharp-firstpass.dll
1>  Pass: 0 took 0 milliseconds
1>  Pass: 1 took 2 milliseconds
1>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.pdb
1>  Weaving assembly D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll
1>  Will export symbols of pdb format
1>  SerializationWeaver done.
1>  Assembly-CSharp-firstpass -> D:\Test\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll
2>------ Build started: Project: Assembly-CSharp, Configuration: Release x86 ------
2>D:\HololensProjects\uguitest\Assets\PlayMaker\Actions\Animator\GetAnimatorDelta.cs(24,21,24,31): warning CS0169: The field 'GetAnimatorDelta._transform' is never used
2>D:\HololensProjects\uguitest\Assets\PlayMaker uGui\Proxies\PlayMakerUGuiComponentProxy.cs(48,9,48,14): warning CS0169: The field 'PlayMakerUGuiComponentProxy.error' is never used
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
2>D:\HololensProjects\uguitest\Assets\PlayMaker uGui\Proxies\PlayMakerUGuiComponentProxy.cs(65,9,65,21): warning CS0169: The field 'PlayMakerUGuiComponentProxy.fsmIntTarget' is never used
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
2>D:\HololensProjects\uguitest\Assets\PlayMaker\Actions\SetFsmVariable.cs(31,32,31,46): warning CS0169: The field 'SetFsmVariable.sourceVariable' is never used
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
2>D:\HololensProjects\uguitest\Assets\PlayMaker Custom Actions\uGui\uGuiDropDownClearOptions.cs(23,44,23,52): warning CS0169: The field 'uGuiDropDownClearOptions._options' is never used
2>D:\HololensProjects\uguitest\Assets\iTween\iTween.cs(74,15,74,24): warning CS0169: The field 'iTween.kinematic' is never used
2>D:\HololensProjects\uguitest\Assets\PlayMaker\Actions\Animator\AnimatorCrossFade.cs(31,15,31,23): warning CS0169: The field 'AnimatorCrossFade._paramID' is never used
2>  Running SerializationWeaver...
2>  Symbols will be read from D:\Test\uguitest\Unprocessed\UnityEngine.pdb
2>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
2>  WeaveAssemblies unityPath= D:\Test\uguitest\Unprocessed\UnityEngine.dll
2>  WeaveAssemblies unetPath= D:\Test\uguitest\Unprocessed\UnityEngine.Networking.dll
2>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
2>  Script Module: Assembly-CSharp.dll
2>  Pass: 0 took 11 milliseconds
2>  Pass: 1 took 20 milliseconds
2>  Symbols will be read from D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.pdb
2>  Weaving assembly D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Unprocessed\Assembly-CSharp.dll
2>   + iTween
2>   + PlayMakerUGuiCanvasRaycastFilterEventsProxy
2>   + PlayMakerUGuiComponentProxy/FsmVariableSetup
2>   + PlayMakerUGuiComponentProxy/FsmEventSetup
2>   + PlayMakerUGuiComponentProxy
2>   + PlayMakerUGuiDragEventsProxy
2>   + PlayMakerUGuiDropEventsProxy
2>   + PlayMakerUGuiPointerEventsProxy
2>   + PlayMakerUGuiSceneProxy
2>   + IncrementRenderQueue
2>   + PlayMakerRPCProxy
2>   + TrackMouseMovement
2>   + iTweenFSMEvents
2>   + RadialLayout
2>   + InputNavigator
2>   + HutongGames.PlayMaker.Ecosystem.utils.Comment
2>   + HutongGames.PlayMaker.Ecosystem.Utils.TransformEventsBridge
2>   + HutongGames.PlayMaker.Ecosystem.Utils.Owner
2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerEventTarget
2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerEvent
2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerFsmTarget
2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerFsmVariableTarget
2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerFsmVariable
2>   + HutongGames.PlayMaker.Ecosystem.Utils.PlayMakerEventProxy
2>  Will export symbols of pdb format
2>  Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Reflection.TypeExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
2>     at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
2>     at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
2>     at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
2>     at Mono.Cecil.TypeReference.Resolve()
2>     at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
2>     at Mono.Cecil.MetadataBuilder.GetConstantType(TypeReference constant_type, Object constant)
2>     at Mono.Cecil.MetadataBuilder.AddConstant(IConstantProvider owner, TypeReference type)
2>     at Mono.Cecil.MetadataBuilder.AddParameter(UInt16 sequence, ParameterDefinition parameter, ParamTable table)
2>     at Mono.Cecil.MetadataBuilder.AddParameters(MethodDefinition method)
2>     at Mono.Cecil.MetadataBuilder.AddMethod(MethodDefinition method)
2>     at Mono.Cecil.MetadataBuilder.AddMethods(TypeDefinition type)
2>     at Mono.Cecil.MetadataBuilder.AddType(TypeDefinition type)
2>     at Mono.Cecil.MetadataBuilder.AddTypeDefs()
2>     at Mono.Cecil.MetadataBuilder.BuildTypes()
2>     at Mono.Cecil.MetadataBuilder.BuildModule()
2>     at Mono.Cecil.ModuleWriter.<BuildMetadata>b__0(MetadataBuilder builder, MetadataReader _)
2>     at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
2>     at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
2>     at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters)
2>     at usw.Weaver.WeaveAssembly(String assemblyPath, AssemblyDefinition unityEngineAssemblyDefinition, ReaderParameters readerParameters)
2>     at usw.Weaver.Weave()
2>     at usw.Program.RunProgram(ConversionOptions options)
2>     at usw.Program.Main(String[] args)
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.
3>------ Build started: Project: uguitest, Configuration: Release x86 ------
3>CSC : error CS0006: Metadata file 'D:\Test\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found
========== Build: 1 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

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.

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?

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.

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.

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. :slight_smile:

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.

Hey, just wanted to let you know that the fix for this issue landed to 5.5.3p1 :).

Does it apply to Unity 5.6 ?

It should land in the first patch release of 5.6. I fixed a bit too late to put it into 5.6.

Thank you for the update.

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

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.

Yeah this has landed in one of the already released unity 5.6 patch releases.

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.

Check this web site, It explains what have to be change in the Nuget configuration