I'm trying to build my first HoloLens app using Unity. I imported the MRTK and its features. I also connected the HoloLens through USB. As soon as I press "Build and Run" it provides 3 errors. My build settings for Universal Windows Platform are the following:
- Target Device: HoloLens,
- Architect: ARM (I also tried ARM64),
- Build Type: D3D Project,
- Target SDK Version: Latest Installed,
- Minimum Platform Version: (all the versions give the same error),
- Visual Studio Version: Latest Installed,
- Build and Run on: USB Device,
- Build Configuration: Release.
Regardless of the build settings, the following errors appear as soon as I press the "Build and Run":
BuildFailedException: Deployment failed.
Output:[22:13:39.766] Windows Phone Player Runner started.
[22:13:39.772] Connecting to device.
[22:13:39.788] An error occurred while running: Could not load file or assembly 'Microsoft.VisualStudio.OLE.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Microsoft.SmartDevice.Connectivity.DatastoreManager..ctor(DatastoreConfiguration configuration)
at Microsoft.SmartDevice.Connectivity.DatastoreManager.Get(Int32 localeId)
at Microsoft.SmartDevice.Connectivity.Wrapper.ConnectivityWrapper12.GetCurrentPlatform(Int32 localeId)
at WindowsPhonePlayerRunner.Program.GetDevice()
at WindowsPhonePlayerRunner.Program.Run(String appxPath, RunnerFlags runnerFlags, IEnumerable`1 copyFilesTo)
at WindowsPhonePlayerRunner.Program.Main(String[] args)
[22:13:39.788] Exiting Windows Phone Player Runner.
ApplicationLauncherImpl.RunOnPhone (System.String commandLine)
ApplicationLauncherImpl.Run (Utility+VisualStudio vs)
ApplicationLauncher.BuildAndRunProject (UnityEditor.Modules.BuildLaunchPlayerArgs args, UnityEditor.WSABuildAndRunDeployTarget deployTarget, System.String platform, Utility+VisualStudio vs)
UnityEditor.PostprocessBuildPlayer.Launch (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, System.String path, System.String productName, UnityEditor.BuildOptions options, UnityEditor.Build.Reporting.BuildReport buildReport) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Build completed with a result of 'Failed' in 177 seconds (176835 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <55729f52d042492e9efc384182ae2feb>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <55729f52d042492e9efc384182ae2feb>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)