Unable to build UWP HoloLens project with DOTS

I am unable to build an empty scene as soon as the Burst package is in my project with the following error using both Unity 2019.2.9f1 and 2019.3.0b5:

Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows.Networking.NetworkOperators.NetworkOperatorsTetheringContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
   at Burst.Compiler.IL.AssemblyLoader.Resolve(AssemblyNameReference name)
   at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
   at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
   at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
   at Burst.Bcl.BclApp.FindExecuteMethods(List`1 rootAssemblyPaths)
   at Burst.Bcl.BclApp.GetMethodsToCompile()
   at Burst.Bcl.Program.Main(String[] args)

And:

BuildFailedException: Burst compiler (1.1.2) failed running

stdout:
An unexpected exception occurred:
stderr:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows.Networking.NetworkOperators.NetworkOperatorsTetheringContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
   at Burst.Compiler.IL.AssemblyLoader.Resolve(AssemblyNameReference name)
   at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
   at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
   at Burst.Bcl.BclApp.LoadAllAssemblyReferences(AssemblyDefinition asmDef, Dictionary`2 visited)
   at Burst.Bcl.BclApp.FindExecuteMethods(List`1 rootAssemblyPaths)
   at Burst.Bcl.BclApp.GetMethodsToCompile()
   at Burst.Bcl.Program.Main(String[] args)

Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.2/Editor/BurstAotCompiler.cs:659)
Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.2/Editor/BurstAotCompiler.cs:597)
Unity.Burst.Editor.BurstAotCompiler+BclRunner.RunManagedProgram (System.String exe, System.String args, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.2/Editor/BurstAotCompiler.cs:571)
Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.2/Editor/BurstAotCompiler.cs:286)
Unity.Burst.Editor.BurstAotCompiler.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at Library/PackageCache/com.unity.burst@1.1.2/Editor/BurstAotCompiler.cs:46)
UnityEditor.Build.BuildPipelineInterfaces.OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport report) (at <52c46852ed4749ed926125cda2005635>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I have found this post: Unity Issue Tracker - [UWP][19.2] Build fails when using Burst with Mixed Reality Toolkit and it should be fixed in Unity 2019.3.0b5. However, this is not the case. Anyone else know how to build a Unity DOTS project to the HoloLens? I also tried to disable burst compilation in the options but with no success.

Created a bug report: Case 1194606

I managed to build a project using Burst but I later found out that it wasn’t true Burst as I didn’t use Unity.Mathemathics in the iJobParallelFor…

Burst has some significant limitations on what you can and can not have in order for it to work. Just adding Burst or BurstCompile doesn’t necessarily make things Bursted if it can’t actually transform your code.

Inclusion of ANY UnityEngine type in your job code will almost guarantee that you will not be Burst compiled.

1 Like

I guess Mike Geig was wrong in his presentations, then…

I haven’t seen that presentation, just my experience in using ECS and Burst for things personally.

As to the original issue, are you sure that you have the assembly that is being called out in the error?

What Unity version are you using?

Thanks for your reply!

How do I find out if I have?

I’ve found the cause, with help of the Unity QA team:

Installing the Hybrid Renderer package first will install the wrong version of the burst compiler (1.1.2).
If you install the burst compiler first, version 1.2.0 preview.8 it will work. So I think the verified version of burst is causing this issue.

2018.4.something for that test. Now we’re on 2019.2 and higher.