【发布时间】:2022-02-10 15:33:24
【问题描述】:
我正在尝试使用 Unity 构建我的第一个 HoloLens 应用。我导入了 MRTK 及其功能。我还通过 USB 连接了 HoloLens。一旦我按下“构建并运行”,它就会提供 3 个错误。我的通用 Windows 平台的构建设置如下:
- 目标设备:HoloLens,
- 架构师:ARM(我也试过 ARM64),
- 构建类型:D3D 项目,
- 目标 SDK 版本:最新安装,
- 最低平台版本:(所有版本都给出相同的错误),
- Visual Studio 版本:最新安装,
- 构建并运行于:USB 设备,
- 构建配置:发布。
无论构建设置如何,只要我按下“构建并运行”,就会出现以下错误:
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&)
【问题讨论】:
标签: c# .net unity3d hololens windows-mixed-reality