I'm trying to deploy my UWP application in developer mode, via POWERSHELL terminal (it MUST BE DEPLOYED VIA TERMINAL)
The application was deployed in past via terminal "fine" with the VS2017 compiled version.
Now it is being compiled with VS2019, but when I try to deploy it via POWERSHELL, I get this error:
> Add-AppxPackage : Deployment failed with HRESULT: 0x80073CFB, The provided package is already installed, and reinstallation of the package was blocked. Check the AppXDeployment-Server event log for details.
>
> 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.
>
> NOTE: For additional information, look for [ActivityId] 71a1ba6c-f33f-0004-c4e6-a1713ff3d601 in the Event Log or use the command line Get-AppPackageLog -ActivityID 71a1ba6c-f33f-0004-c4e6-a1713ff3d601
I run the above command in a PowerShell terminal as administrator, since it didn't worked as normal user.
I already tried several ways to remove the Microsoft.NET.CoreRuntime.2.2_2.2.27902.3_x64__8wekyb3d8bbwe runtime, without success.
One of several examples in web are:
https://learn.microsoft.com/en-us/answers/questions/79515/uwp-app-x64-microsoftnetcoreruntime22appx-failed-t.html
https://stackoverflow.com/questions/13865930/how-to-uninstall-an-app-that-another-user-installed
These are some of the sites and solutions that I execute, in a attempt to try fix this issue, without success.
All them seen to rely on the ability to appx-remove (with and without --allusers flag) to remove the app, what does not happen:
The follow error happen when I try tro remove the runtime:
> PS C:\WINDOWS\system32> Get-AppxPackage -AllUsers 'Microsoft.NET.CoreRuntime.2.' | Remove-AppxPackage -AllUsers
> Remove-AppxPackage : Package failed updates, dependency or conflict validation.
> Windows cannot remove framework Microsoft.NET.CoreRuntime.2.2_2.2.27902.3_x86__8wekyb3d8bbwe because package(s) app.ae661c378-4548-409a-afa5-6c0202234a28 currently
> depends on the framework. Removing all packages that depend on the framework automatically removes the framework.
> At line:1 char:62
> + ... lUsers 'Microsoft.NET.CoreRuntime.2.' | Remove-AppxPackage -AllUsers
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : NotSpecified: (:) [Remove-AppxPackage], COMException
> + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
I was unable to discover who is app.ae661c378-4548-409a-afa5-6c0202234a28
I don't know what more to do, and I'll have to freeze my CI because I can't deploy anymore my application.