microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6.01k stars 2.12k forks source link

Build Error on Unity 2021.1.15f1 / MRTK 2.7.2.0 #10130

Closed ARecentDeveloper closed 3 years ago

ARecentDeveloper commented 3 years ago

The following errors are thrown while trying to build an app using MRTK for Hololens 2.

ArgumentException: The Assembly UnityEditor.CoreModule is referenced by UploaderTool_Editor ('Packages/com.microsoft.altspacevr_uploader/Plugins/UploaderTool_Editor.dll'). But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at <5be0ebaa82df43c7b5c1b1db9bde1e97>:0) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at <5be0ebaa82df43c7b5c1b1db9bde1e97>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Build completed with a result of 'Failed' in 6 seconds (5782 ms) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <5be0ebaa82df43c7b5c1b1db9bde1e97>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <5be0ebaa82df43c7b5c1b1db9bde1e97>:0 UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I followed the exact same steps from this tutorial.

Unity 2021.1.15f1 Mixed Reality Toolkit 2.7.2.0

keveleigh commented 3 years ago

Packages/com.microsoft.altspacevr_uploader

Are you using the AltspaceVR Uploader package? You might be able to uninstall it to work around this issue if not. As far as I can tell from the linked tutorial, the only packages it asks to be installed are Mixed Reality Toolkit Foundation and Mixed Reality OpenXR Plugin:

Check the Mixed Reality Toolkit Foundation and click on the dropdown next to it to select MRTK 2.7.2, also check the Mixed Reality OpenXR Plugin 1.0.0 and click on the dropdown next to it to select most recent version available, then click on Get features button to download the selected packages.

We'll also reach out to the Altspace team to bring this to their attention. FYI @davidkline-ms

Also, which build platform are you targeting for this build?

ARecentDeveloper commented 3 years ago

Thank you, the error seems to come from AltspaceVR as you mentioned. I removed the package and everything works as it should for now. Thanks again. As for the build platform, (if I understood you correctly) I was using UWP 10.0.10240.0. for Hololens 2 (Please see image below) image Thanks again.

keveleigh commented 3 years ago

Thanks for following up! Going to close this for now, as it's up to the Altspace team to update their package. I've made them aware of this issue.