Visual Studio Deploying to Hololens Access is Denied

I am trying to deploy to Hololens 2. I followed all of the documentation located here for deploying from USB, but when I go to Debug .> Start without Debugging, I get the following error message:

Unable to activate Windows Store app. 'Template3D__pzq3xp76mxafg!App'. The activation request failed with error 'Access is Denied'.

Has anyone else gotten this error before? How did you solve it? There doesn't seem to be any documentation anywhere.

Upvotes: 0

Views: 1137

Answers (2)

pixelpress
pixelpress

Reputation: 119

In my case, uninstalling the app and deleting the existing build folder didn't help. The solution was very simple: You need to be signed in on the Hololens 2 and keep it on your head. I'm using a PIN for my account and also paired the Hololens and allowed the developer options. I just tried several times to confirm and without logging in, I get exactly the described error. I'm deploying over USB.

Upvotes: 0

Hernando - MSFT
Hernando - MSFT

Reputation: 2900

The error message may be caused by various different reasons. And for now, we guess that the issue may happens when VS is trying to activate another app with the same package name on your HoloLens. So, we think the following steps worth trying for you.

  1. Uninstall the existing app with the same name on your HoloLens.
  2. Rebuild your Unity project to another empty folder, then open the UWP project with VS.
  3. Update the DisplayName and Package name property in the Package.appxmainfest file with another name.

Upvotes: 1

Related Questions