Reputation: 422
I keep getting this error everytime I try to deploy my UWP app to my local device.
Severity Code Description Project File Line Suppression State 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 - No connection could be made because the target machine actively refused it. (Exception from HRESULT: 0x8007274D) [0x8007274D] Voip
I have absolutely ZERO idea on how to resolve this, as it seems everyone else that has this issue is trying to connect to a remote device.
Upvotes: 13
Views: 11020
Reputation: 311
I'm using a Microsoft DevBox (ARM64) with Visual Studio 2022 17.11 connected by USB-C cable supplied with the HoloLens 2 to the HoloLens 2. Portal is on USB discovery is on. Pairing was successful. I do this a lot. Things I have found using this setup for debugging. To debug the app set the project to Release/ARM64. In my properties settings for the UWP app I set the Remote IP address and I set the permissions to Universal and save that setting. I then also change it to Device and in both cases I set the debugger type to mixed because I am using both C# and C++. Rather frequently after both devices have entered sleep mode and VS is still running and they are still connected, when I return and try to debug I get this error. The only fix I have found is a cold-boot (shutdown) and restart of the HoloLens and also a restart of the DevBox. Both must be rebooted. Rebooting one or the other doesn't seem to work. I usually reboot HoloLens first and then the DevBox.
Upvotes: 0
Reputation: 1
personal experience
if you encounter an issue connecting to the remote device if the normal steps of unblocking do not work like restarting vs, run it as administrator, or miss config => do the following: Reset all pairings in the device portal or on Xbox dev home If you are using vs 2017, install vs 2022 choose UWP template for c# xaml Xbox Make sure you tick the latest Windows SDK during for install when you are in vs 2022 installation process, Re-pair should be re-enabled on the first deployment, even if it results in error when you deploy remotely it is okay cos the template is XAML and we are using .js Then go back to vs 2017 For the target version keep as previous, but if an error is prompted choose the latest Windows SDK version Redeploy to the remote machine again (wishing you luck, here I have prayed) optional 8. If an error for the splash screen image is prompted, make sure you comment the code for the splash screen tag in AppManifest.xml, which is located in the project directory under debug > x64 Redeploy again Happy debugging
Upvotes: 0
Reputation: 21
I got this error when trying to deploy to HoloLens2 using USB.
I fixed it by going to Settings > Update & Security > For developers
on the HoloLens and enabling Use developer features
, Device discovery
, and Device portal
.
Upvotes: 0
Reputation: 349
Make sure your device is connected to your machine.
I had forgotten to plug in my device (hololens 2 in this case).
Solved this error straightaway. It's hard to find something thats not there. :D
Upvotes: 0
Reputation: 662
I got the same error. The problem disappeared when I changed the platform to x86 (or x64) in Visual Studio's configuration manager.
Upvotes: 38