Universal Windows Platform app registration fails - blocked by AppLocker
Asked Answered
A

3

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?

Accommodative answered 20/10, 2016 at 11:10 Comment(3)
I just started seeing the same error with a UWP application using Xamarin. Any help would be appreciated.Olivarez
did you ever end up resolving this? thanks!Dioptometer
I have this exact problem. Formatted my pc twice already.Mendelson
C
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.

Consistency answered 11/6, 2017 at 1:14 Comment(2)
Thanks so much for that. I added the folder "AppLocker" (not "AppBlocker") and it works now. That's a really weird bug.Autoerotism
Thanks @kapsi, fixed the typo.Consistency
P
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!

Pharmacist answered 29/10, 2016 at 9:19 Comment(2)
Me too in exactly same boat. As I've been upgrading from Windows 7-8-8.1-10-Aniv...I'm taking this opportunity to move into SSD from HDD, Install Win10 from base and ... But very bad that current ongoing development and support for my development got severely hit.Alkane
Best of luck! Just to say quickly that the fresh windows install worked. I only needed to reinstall software, all my files in non-windows locations stayed put. Since then everything has worked smoothly, it was just something specific with Xamarin and the Windows anniversary edition not playing nicely together.Pharmacist
C
0

This worked for me:

  • Delete all the CI policies here C:\windows\System32\CodeIntegrity\CiPolicies\Active* (Should be p7b files)
  • Reboot
Carrie answered 13/5, 2020 at 7:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.