UWP App (x64) Microsoft.NET.CoreRuntime.2.2.appx failed to install

John Curtis 21 Reputation points
2020-08-28T01:31:42.757+00:00

Building a simple UWP app I get the error below on x64 builds only.
Tried everything I could find online but ended up reinstalling Win10 to get rid of it .... now it is back again!
Any tips on how to force an overwrite of the package causing the problem?
I think I am going to give up on UWP apps- it seems the system is way to fragile.

Similar to:
https://learn.microsoft.com/en-us/answers/questions/33630/installing-missing-frameworks-forever-with-framewo.html

Creating a new clean layout...
Copying files: Total 21 mb to layout...
Checking whether required frameworks are installed...
Framework: Microsoft.NET.CoreRuntime.2.2/X64, app package version 2.2.27902.3 is not currently installed.
Framework: Microsoft.NET.CoreFramework.Debug.2.2/X64, app package version 2.2.28529.0 is not currently installed.
Framework: Microsoft.VCLibs.140.00.Debug/X64, app package version 14.0.27810.0 is not currently installed.
Installing missing frameworks...
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.

Universal Windows Platform (UWP)
{count} votes

4 answers

Sort by: Most helpful
  1. itSale 16 Reputation points
    2021-01-05T20:21:23+00:00

    On start menu, go to visual studio 20xx folder -> [right click on] developer power shell -> [left click to select] Run as administrator

    To remove package from all users Type:

    Get-AppxPackage -allusers 'Microsoft.NET.CoreRuntime.2.2_2.2.27404.2_x86__8wekyb3d8bbwe' | Remove-AppxPackage 
    

    Or to remove all 2.* versions

    Get-AppxPackage -allusers 'Microsoft.NET.CoreRuntime.2.*' | Remove-AppxPackage 
    

    And reinstall again package:

    Get-appxpackage -name Microsoft.Net.CoreRuntime.2.2 
    

    Hope it helps,

    Cheers

    3 people found this answer helpful.

  2. Josh Davis 1 Reputation point
    2020-12-02T06:22:09.923+00:00

    Just ran into this issue as well on Visual Studio Pro 16.8.2. Waiting 12 hours didn't do it for me. I also noticed that the Microsoft Store app was in a hung state - several app updates were wedged in "Installing..." but with no progress. Here's what I did to get unblocked:

    Reset Microsoft Store

    1. Open the Settings app and navigate to Apps
    2. Search for "Microsoft Store in the list and click it, then click "Advanced Options" that appears after clicking the app
    3. Scroll down and click the "Terminate" button
    4. Scroll down and click the "Reset" button - agree to the prompts that appear
    5. Open an admin command prompt
    6. Run wsreset.exe

    After wsreset.exe completes, I restarted my computer. When it came back up, I installed all of the Microsoft Store app updates, which included an App Installer update, which is probably important, but that's mostly speculation. After all the store apps updated, I opened VS and went to deploy my UWP. It hit the same point as before where it said it needed to install the appx, and then quickly blew through it and deployed the app.

    All of these steps may not be necessary, but it's what I did to get unblocked. Hopefully, it helps someone else.

    0 comments No comments

  3. Alberto Lubert 1 Reputation point
    2021-03-12T13:45:03.443+00:00

    I am on Windows 10 Acer laptop and was working for years with VS 2019 and 2017. At a certain point I, following stupidly Microsoft advices have managed to disinstall everything but could not reinstall anything back. I succeded in that by installing Microsoft.NET Core 3.1.407 (I think). After that 2017 and 2019 have istalled. 2017 worked but 2019 did not displaying the terrific message of John Curtis. After three weeks I fixed that simply opening NuGet Managing (the english may be incorrect because I have VS in italian) in solution Explorer. There appeared "Microsoft.NetCore.UniversalWidowsPlatform". Also appeared an update to that. I installed it accepting everything. After that VS 2019 restarted working and did not displayed any terrifying messages.

    0 comments No comments

  4. Gregory Bologna 56 Reputation points
    2021-05-11T22:55:25.08+00:00

    I was using VS2019 preview to check out Winui 3. I struggled with this issue for over 3 hours, and even resorted to uninstalling vs and rebuilding my .net framework. None of the options on this page worked for me. Being that the package is in my user .nuget path, I got thinking about permissions. That's when I remembered what I had done. Our company just implemented a new UAC policy so every app now prompts "Do you want to allow this app, blah...blah..." I got tired of the prompt so I unchecked "Run as administrator" on my Visual Studio 2019 shortcut. Once I put it back, the issue resolved.

    0 comments No comments