Search code examples
visual-studio-2019hololens

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.


Solution

  • 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.