Search code examples
uwpwindows-10sideloading

UWP sideload install failed due to Microsoft.NET.CoreFramework.2.2


I currently have some issues distributing and UWP app I developped. I tried to install the application on the same computer on which it has been developped but in another user account which does not have administrator priviledges.

The main issue is caused by the package "Microsoft.NET.CoreFramework.2.2".

(1) First I tried to install it simply, (2) then I tried to add in package.appxmanifest the following line:

<Dependencies>
    <PackageDependency Name="Microsoft.NET.CoreRuntime.2.2" MinVersion="2.2.27902.3" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>

I do not know if it 'Minversion' or 'Publisher' are correct since I did not found any information about it. I based the declarations on https://learn.microsoft.com/en-us/troubleshoot/developer/visualstudio/cpp/libraries/c-runtime-packages-desktop-bridge which has already been integrated since the package was causing the same issue.

I currently have the following issue for this release published:

Image 1: enter image description here

Image 2: enter image description here

Previously, I tried to follow the answer provided in a similar topic https://learn.microsoft.com/en-us/answers/questions/79515/uwp-app-(x64)-microsoft-net-coreruntime-2-2-appx-f

The answer provide did not helped me to solve the issue at all.

More information about the configuration:

(1) Computer environment: Windows 10 Version 22h2 build 19045.2546

(2) UWP settings :

(a) Target version: Windows 10 version 2004 build 19041

(b) Minimal target: Windows 10 version 1903 build 18362

I will gladly provide any other useful information which could lead you to help me.


Solution

  • I found the error in the solution.

    The issue came from the wpf application used to install the package. Since the certificated was needed to be install the package in the local machine, I was forcing the wpf application to be launched with administrator priviledges. I was using a cmd.exe to silently launch powershell command.

    Later, I just used the powershell command generated by visual studio to install the package, but I did not remove this cmd.exe command.

    I think the issue came from there. I suppose running the powershell command to install the package using the admin priviledges made the UWP app available inside the administator session and not the opened session.

    After removing this constraint (security), the package has successfully installed by the application.