windows - 通用 Windows 平台应用程序注册失败 - 被 AppLocker 阻止

标签 windows visual-studio uwp

从 Visual Studio 2015(更新 3)本地部署 UWP 应用程序失败并显示错误消息:

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)

完整输出不会增加进一步的洞察力:

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 ==========

这是通过 File > New > Project... > Blank App (Universal Windows) 创建的新项目,没有进行其他更改。

Visual Studio 以管理员身份运行。

Windows 10(1607 Build 14393)设置为开启开发者模式

Other suggestions包括删除%LocalAppData%\Packages中的app目录,但是没有这个app对应的目录。

这可能是什么问题?对于解决此问题的后续步骤有什么建议吗?

最佳答案

每次我尝试在 UWP 项目中打开 XAML 文件时,Visual Studio 2017 都会弹出同样的错误。通过简单地创建文件夹 C:\Windows\System32\AppLocker 来修复它。

关于windows - 通用 Windows 平台应用程序注册失败 - 被 AppLocker 阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40152760/

相关文章:

ruby-on-rails - Windows 7 64 位 : Could not find a valid gem 'compass' (>= 0), 这里就是为什么 : Unable to download data from https://rubygems. org/

c - 将 `HWND` 与 `INVALID_HANDLE_VALUE` 进行比较是错误的吗?

visual-studio - 如何配置.sln Visual Studio Project 文件存储在项目文件夹中?

visual-studio - 文字高亮视觉辅助x

c# - UWP 文件选取器 FileTypeFilter 异常

windows - 如何禁用delphi形式的所有操作

NASM 程序集中的 Windows API 蜂鸣功能

visual-studio - Visual Studio 调试控制台有时会保持打开状态并且无法关闭

c# - 如何在 UWP 应用程序中检查 Windows 10 操作系统版本以消除 WACK 测试失败?

javascript - 如何在 Windows 10 UWP javascript 中检查前台/后台状态