App package not installed in WinUI3???

youki 1,016 Reputation points
2024-03-02T02:24:38.6866667+00:00

Hello,

I added a Packaging Project to my unpackaged WinUI 3 app and set the Packaging Project as Startup Project in VS 2022.

I get the following error:

DEP0800: The required framework "C:\Users\xxx\source\repos\cpp\UI_Test 3\packages\Microsoft.WindowsAppSDK.1.2.230118.102\build..\tools\MSIX\win10-x64\Microsoft.WindowsAppRuntime.1.2.msix" failed to install. [0x80073D06] Windows cannot install package Microsoft.WindowsAppRuntime.1.2_2000.747.1945.0_x64__8wekyb3d8bbwe because it has version 2000.747.1945.0. A higher version 2000.802.31.0 of this package is already installed.

What's wrong here?

Sources
Packaging: https://video2.skills-academy.com/en-us/windows/msix/desktop/desktop-to-uwp-packaging-dot-net
Debugging: https://video2.skills-academy.com/en-us/windows/msix/desktop/desktop-to-uwp-debug

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,816 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
745 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mahmoud Ashraf Mahmoud Eid Elsayed 20 Reputation points
    2024-03-03T23:30:17.1933333+00:00

    The error message you're encountering suggests that there is a version mismatch between the Microsoft Windows App Runtime package required by your Packaging Project and the version that is already installed on your system.

    Here are a few steps you can take to resolve this issue:

    Check package versions: Verify the version of the Microsoft.WindowsAppRuntime package specified in your Packaging Project configuration. It seems that your project is expecting version 1.2.230118.102, but the error indicates that version 2000.747.1945.0 is already installed on your system.

    Update package references: Update the references to the Microsoft.WindowsAppRuntime package in your Packaging Project to match the version that is already installed on your system (2000.802.31.0). You can do this by modifying the package references in your project file or through Visual Studio's NuGet Package Manager.

    Clean and rebuild: After updating the package references, clean your solution and rebuild it to ensure that all dependencies are resolved correctly.

    Check dependencies: Review any dependencies or requirements for your Packaging Project and ensure that they are compatible with the version of the Microsoft.WindowsAppRuntime package that is installed on your system.

    Check for updates: Check for any updates to the Microsoft.WindowsAppSDK or related packages in your project and install them if available. Sometimes, newer versions of packages may include bug fixes or compatibility improvements that could resolve the issue.

    Review configuration: Double-check your project configuration settings, such as target platform and architecture, to ensure they are set correctly and are compatible with the installed version of the Microsoft.WindowsAppRuntime package.

    By following these steps, you should be able to resolve the version mismatch issue and successfully build your WinUI 3 app with the Packaging Project in Visual Studio 2022.