Universal Windows Platform app registration fails - blocked by AppLocker

14

Deploying a UWP app locally from Visual Studio 2015 (Update 3) fails with the error message:

DEP0700 : Registration of the app failed. error 0xC000003A: Deployment of package 6dd81a71-9c3a-4204-abaf-886a9b0c29bb_1.0.0.0_x86__kcdnnw7pbsh48 was blocked by AppLocker. (0x80073cf9)

The full output doesn't add further insight:

Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Build started: Project: App2, Configuration: Debug x86 ------
1>  App2 -> c:\users\<username>\documents\visual studio 2015\Projects\App2\App2\bin\x86\Debug\App2.exe 
2>------ Deploy started: Project: App2, Configuration: Debug x86 ------
2>Updating the layout... 
2>Copying files: Total <1 mb to layout... 
2>Checking whether required frameworks are installed...
2>Registering the application to run from layout... 
2>DEP0700 : Registration of the app failed. error 0xC000003A: Deployment of package 6dd81a71-9c3a-4204-abaf-886a9b0c29bb_1.0.0.0_x86__kcdnnw7pbsh48 was blocked by AppLocker. (0x80073cf9)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

This has been created as new project via File > New > Project... > Blank App (Universal Windows), with no other changes being made.

Visual Studio is running as Administrator.

Windows 10 (1607 Build 14393) is set up with Developer mode on.

Other suggestions include deleting the app directory from %LocalAppData%\Packages, but there is no directory corresponding to this app.

What could the issue be here? Is there any advice on next steps to troubleshoot this?

windows
visual-studio
uwp
asked on Stack Overflow Oct 20, 2016 by Steve • edited May 23, 2017 by Community

3 Answers

12

Had this same error popping up with Visual Studio 2017 every time I tried to open a XAML file in UWP project. Fixed it by simply creating the folder C:\Windows\System32\AppLocker.

answered on Stack Overflow Jun 11, 2017 by Doug Knudsen • edited Jun 22, 2017 by Doug Knudsen
5

I faced the exact same situation you described last week. It’s taken some time to come back to you as I wanted to go through all the “fix it” options first. I tried all you mentioned and to no avail. You don’t mention it, but I’m guessing you are also using the Pro edition?

I then looked a little more broadly, and found many other users having the same problem installing or updating apps from the Windows store after “upgrading” to the anniversary edition of Windows 10, which you mention you are using. The error code is the same and AppLocker is again the culprit, so it would be worth you testing a new download from the store to see if this is also true for you.

If so, it seems to be because Microsoft has decided to limit some of the useful policy configuration which was previously available in Pro, and now only available in Enterprise or Education. One of the changes that is affecting us is to limit the usage of AppLocker. It’s a real shame and at odds with the push to make a really polished version of Visual Studio and Xamarin (ok – Xamarin is still a little buggy) available on a community license, but then at the same time, changing the OS so that to use the free development tools, you will need an Enterprise license. And normally, the Enterprise edition for Win 10 is only available with a bulk purchase! This blog is a good summary of the changes that have been made in the anniversary edition.

There are two more fixes you could try – run wsreset.exe from a command prompt with admin rights or download this trouble shooter from the MS site. These will try to fix your Windows store configuration, which might also help with UWP deployment. Neither worked for me, but some people online mentioned it worked for them.

So I am facing the tedium of a fresh Windows 10 install – either to go back to the previous version and stop the update to the anniversary edition by tweaking the wifi access… or finding a fresh install of the anniversary edition. I’m going to try the former first as it is one less download, though I’ll still need to download all of the whopping 35gb of Visual Studio and Xamarin again so will wait until I have some spare time!

answered on Stack Overflow Oct 29, 2016 by Eeeeed
0

This worked for me:

  • Delete all the CI policies here C:\windows\System32\CodeIntegrity\CiPolicies\Active* (Should be p7b files)
  • Reboot
answered on Stack Overflow May 13, 2020 by Mounika

User contributions licensed under CC BY-SA 3.0