microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.84k stars 320 forks source link

Sideload Updates for ARM64 Builds switching to x64 #3972

Open Wandtket opened 11 months ago

Wandtket commented 11 months ago

Describe the bug

When deploying an MSIX package to a shared location, computers with ARM64 architecture view x64 builds as updates.

Steps to reproduce the bug

  1. Sideload an app to an ARM64 device
  2. Publish a build of an app to x86, x64, ARM64 to a shared location with check for updates automatic
  3. Tablet changes architecture from ARM64 to x64 and runs in compatibility mode.

Expected behavior

ARM64 builds should only update when another ARM64 build is released.

If an x64 build is sideloaded on an ARM64 device only update if an x64 build is released.

Screenshots

No response

NuGet package version

Windows App SDK 1.4.3: 1.4.231115000

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

DrusTheAxe commented 9 months ago

computers with ARM64 architecture view x64 builds as updates.

Yes. ARM64 supports x64 (and x86) packages.

ARM64 builds should only update when another ARM64 build is released.

That's not how MSIX works. If you have a package installed and you have a newer version available the newer version can be installed. If there are multiple 'applicable' packages then the 'best fit' is selected. If there are multiple applicable packages of equal version then we prefer the host-native matching package (e.g. arm64 on an ARM64 machine).

If you've got v1 installed (doesn't matter the architecture) and you've got x64 v2 available then you'll update. But there is no requirement or restriction to 'stick' to an architecture across updates.

Wandtket commented 9 months ago

@DrusTheAxe

That's not how MSIX works. If you have a package installed and you have a newer version available the newer version can be installed. If there are multiple 'applicable' packages then the 'best fit' is selected. If there are multiple applicable packages of equal version then we prefer the host-native matching package (e.g. arm64 on an ARM64 machine).

If you've got v1 installed (doesn't matter the architecture) and you've got x64 v2 available then you'll update. But there is no requirement or restriction to 'stick' to an architecture across updates.

I would argue that it should though, when publishing an app and sideloading it only allows you to remember one location to output to. If in my company I have several x64 computers along with several arm64 tablets I would like for the arm64 tablets to remain on arm architecture. So the solution should either be to add multiple output locations so I can separate ARM builds from x64 or have sideloaded apps only check for updates for its architecture.