question

KevinFoley-9100 avatar image
0 Votes"
KevinFoley-9100 asked KevinFoley-9100 answered

Can't deploy UWP apps to HoloLens 2

I am trying to deploy a simple 2D UWP XAML app (not a holographic app made with Unity/Unreal) to my HoloLens 2. This used to work, but recently deployment has only worked intermittently, and then stopped working altogether.

I have tried deploying from Visual Studio Community 2019 and Visual Studio Community 2022. When deployment fails, I get the error:

Error: Unable to connect to the Microsoft Visual Studio Remote Debugger named 'HOLOLENS-UC****'. The Visual Studio {2019/2022} Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.

The HL2 always shows up when I click "Find" from the debug settings menu:

262055-hl2-deployment-configuration.png

  • My HL2 is powered on and logged in

  • Developer Mode is enabled on both my development PC and the HL2

  • I have tried deploying both over USB and over Wifi, but deployment fails with the same error in either case.

  • The HL2 and my development PC are on the same network.

  • If I enable Device Portal, I can always access the HL2 from my PC's browser

  • Visual Studio is allowed through Windows Firewall

  • Deployment used to work correctly, and my network hardware has not changed

  • I have triple-checked that all required workloads/SDKs are installed, as described here

  • I have restarted my PC and the HL2 multiple times each

  • Factory-resetting the HL2 did not resolve the issue

Visual Studio Community: 2022 (17.4.1), 2019 (16.11.19)
HoloLens 2: Windows Holographic for Business 20348.1528
Development PC: Windows 10 Pro 22H2 19045.2251






windows-uwpvs-generalvs-debugginghololens-development
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ZuochengWang-MSFT avatar image
0 Votes"
ZuochengWang-MSFT answered KevinFoley-9100 commented

Hello, Welcome to Microsoft Q&A,

Currently, there are two ways to deploy apps to HoloLens.
1. Deploy via WIFI/USB, the target is Remote Machine.
2. Deploy via USB, the target is Device.
It should be noted that when deploying to Remote Machine, it is recommended to manually enter the current HoloLens IP address in Manual Configuration->Address instead of depending on Auto Detected. And from the error message you provided, Visual Studio did not recognize the HoloLens device, please try to enter the IP address manually.
If deploying to Remote Machine fails, you can try deploying to Device. This deployment method needs to be connected to your device with USB, and Visual Studio needs to install the component USB Device Connectivity.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Deployment does not work if I manually enter the IP address - it fails with the same error.

Deployment does not work if I connect with USB and try deploying to Device - I get the 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.

0 Votes 0 ·
KevinFoley-9100 avatar image
1 Vote"
KevinFoley-9100 answered

It seems like this issue was related to the OpenCV-Sharp, as removing their Nuget packages from the project fixed the deployment issue. We were testing the ARM version of OpenCV-Sharp, but perhaps it isn't compatible with the HoloLens 2. It's frustrating that the package caused deployment to fail with such a generic error message; there was no indication that OpenCV-Sharp was causing the issue.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.