HoloLens error: "There were deployment errors. Continue?"

HoloLens error: "There were deployment errors. Continue?"

我正在尝试按照 this 教程将我在 Unity 中构建的应用程序部署到 HoloLens 2。

这是我在Unity中输入的构建设置。

当我通过 selecting“Master”、“ARM64”、“Device”然后在 Visual Studio 中“Start without debugging”来部署应用程序时,我收到此错误“There were部署错误。继续吗?”。如果我 select 是然后我得到以下错误:

Error DEP6957: Failed to connect to device '127.0.0.1' using Universal Authentication. 
Please verify the correct remote authentication mode is specified in the project debug settings.
COMException - Error HRESULT E_FAIL has been returned from a call to a COM component.
[0x80004005] XamlControlsGallery

我打开了 Microsoft HoloLens 门户并登录了 HoloLens,笔记本电脑和 HoloLens 都在同一个 WiFi 上。

我试过:

要通过 Wi-Fi 部署到 HoloLens,请 select 在部署目标下拉菜单中选择“远程计算机”而不是“设备”。然后,转到 Project > Properties > Configuration Properties > Debugging,并在 Address 或 Machine Name 字段中输入您设备的 IP 地址,更多信息请参见:Deploying a HoloLens app over Wi-Fi

我最终按照以下步骤使它起作用:

  1. 确保 Unity 中的构建设置与您将在 Visual Studio 中使用的设置相同,除了设备设置应为“本地计算机”。
  2. 在 Visual Studio、select“远程机器”中。
  3. 在 Visual Studio 中打开项目后,select 编辑 > 项目 > 属性 > 配置属性 > 调试并输入设备的 IP 地址。