Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality. If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers. And always feel free to hit us up on Twitter @MxdRealityDev.

Deploy to emulator fails with DEP6957 erorr (first time)

I was noticing a pattern that the first time Visual Studio was launching my emulator it would consistently fail to deploy and would show the following error:

Severity    Code    Description Project File    Line    Suppression State
Error       DEP6957 : Failed to connect to device '169.---.---.--' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings. 0x8007274C: The network event being waited on triggered an error.

After it failed once, it would then run successfully on the second try.
However, further attempts to run it (3rd, 4th, etc.. ) would fail.
I was finding myself going through the slow and painful cycle of closing down the emulator, deploying to the emulator and waiting for it to load then fail, deploying again for a single successful run, then repeating the process after every change.

Finding this frustrating I eventually recalled a suggestion that @jboulanger made to me in another post to set a Debug flag in the projects properties pane that would uninstall previous deployment. It helped with my problem with the 2D apps.

Sure enough it seems to also help with Unity 3D apps to avoid this vicious cycle.
When the emulator first loads the first deployment still fails for me, but deployments to the already loaded emulator seem to have a much better success rate when the "Uninstall and then re-install my package. All information about the application state is deleted." checkbox is check in the project properties debug pane.

Windows Holographic User Group Redmond

WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
WinHUGR YouTube Channel -- live streamed meetings

Tagged:

Best Answer

Answers

  • I am also facing the same issue. After adopting the debug settings suggested above, it still unable to resolve the issue.

  • @HoloSheep said:
    Since I answered my own question in the actual post, I will just suggest that if you are running into the DEP6957 error that you might want to try the above approach of setting the Uninstall checkbox in the project properties to true and then try deploying again to the already loaded emulator.

    This is also true when using the actual HoloLens hardware, not just the emulator.

  • I'm having this issue even after changing my project properties :(

    Happy coding!

  • This may be a work around, but I managed to solve it on my machine by doing as @HoloSheep suggested, then I deployed the solution to the HoloLens emulator and then run the project without debugging.

    Not sure if this is a permanent solution, but it works for now!

    Happy coding!

  • @willvelida said:

    Not sure if this is a permanent solution, but it works for now!

    I definitely agree with this statement. Got it working before I came across this post but still on the search for a permanent solution.

  • Have spent additional time on this and believe it is network related. Hyper-V seems to rely on virtual network switches and NATting to connect the deployment to the HoloLens emulator.
    When you think about this in context its highly likely. A little more theory before we get to my proposed solution...
    Ok. We have a VM (virtual machine, the HoloLens emulator) running from our local machine, where our app is running. Obviously the two (Emulator and Local Machine) need to exchange data, thus a network is required. To accomplish this we use a vEthernet NAT switch (Hyper-V calls it "Internal Ethernet Port Microsoft Emulator NAT Switch". Run command ipconfig in powershell, you should see it listed) to give translate (and give) our local machine a network address on the vLAN the emulator is running on (which is accomplished using the "Internal Ethernet Port Windows Phone Emulator Internal Switch" I believe). The new network being the 169.254.x.x that you see as the URL when you're in the device portal.

    I've managed to resolve the issue by turning off Hyper-V functionality on my local machine and then turning it back on again.

    Control Panel
    Programs
    Turn Windows Features On and Off
    Unselect Hyper-V and hit OK
    Restart

    Control Panel
    Programs
    Turn Windows Features On and Off
    Select Hyper-V and hit OK
    Restart

    Build app in VS
    Deploy... this worked for me.

    This should have reverted your Hyper-V HoloLens Emulator VM to its default settings and reset both the NAT switch and Phone Emulator Switch to their correct settings, which all must be in sync for the E2E deployment of the app runtime to the emulator to work.

    Since last time i deployed apps I've been adding and removing VM's on Hyper-V and the settings appear to have been corrupted. I did the upgrades to latest Unity (5.5.03f) and VS community update 3 using HoloLens Emulator 10.0.14393.0.

    These settings are clearly temperamental and i've had the exact error message @HoloSheep had but his solution seems to have worked for an earlier build or perhaps is from a different issue, but hopefully this will provide people with an alternative solution and some science (I may be incorrect about some points above) behind what the cause appears to be.

  • The temperamental element is likely a security/authorization issue.

  • I have the same issue, and solve the problem by go to updating the new hololens os.

  • I am using an il2cpp project and resolved this issue as follows:

    In my Visual Studio C++ project, I went to Project > Properties and selected the Debugging option from the right-hand nav.

    For the Debug target, the HoloLens emulator was already selected. However, in the pulldown for the Debug Target there had appeared another option for inheriting the Debug target from the parent project. When I selected this option I was then able to deploy to the emulator.

    (Interestingly, thereafter the option for inheriting the Debug Target from the parent project was no longer present in the pulldown.)

  • Thanks ! My Hololens IP change so visual studio was set to the old IP, and by going to the debug properties i have set the new IP

Sign In or Register to comment.