部署UWP应用出现DEP0800错误“Microsoft.NET.CoreRuntime.2.2.appx安装失败”

问题描述:

在Windows10中,第一次用Visual Studio部署UWP应用时,有时会抛出DEP0800错误,具体内容如下:

DEP0800: The required framework "C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x64.microsoft.net.uwpcoreruntimesdk\2.2.10\build..\tools\Appx\Microsoft.NET.CoreRuntime.2.2.appx" failed to install. [0x80073CFB] Deployment of package Microsoft.NET.CoreRuntime.2.2_2.2.27902.3_x64__8wekyb3d8bbwe was blocked because the provided package has the same identity as an already-installed package but the contents are different. Increment the version number of the package to be installed, or remove the old package for every user on the system before installing this package.

 

解决办法:

以管理员权限运行Powershell,执行以下指令:

1  Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}

此指令将重置所有的UWP应用。如果出现红色的异常,无视即可。

 

参考文献:

[0].https://docs.microsoft.com/en-us/answers/questions/79515/uwp-app-x64-microsoftnetcoreruntime22appx-failed-t.html

posted @ 2021-01-19 15:37  OPTIMO  阅读(474)  评论(0编辑  收藏  举报