From f19fbd60ca78a8d1ea74384ef6fb10db8dab6425 Mon Sep 17 00:00:00 2001 From: Paulo Corcino <7800501+paulocorcino@users.noreply.github.com> Date: Tue, 7 Jul 2026 19:23:26 -0300 Subject: [PATCH] fix(store): use a __VERSION__ token so packaging never corrupts MinVersion The -creplace 'Version="..."' also matched TargetDeviceFamily MinVersion, rewriting it to the package version (0.1.0.0). Partner Center then rejected the upload (MinVersion <= 10.0.17134.0). Replace an explicit __VERSION__ token in the Identity element instead, leaving MinVersion (10.0.17763.0) and the XML declaration untouched. Co-Authored-By: Claude Opus 4.8 (1M context) --- packaging/msix/AppxManifest.xml | 2 +- packaging/msix/build-msix.ps1 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/msix/AppxManifest.xml b/packaging/msix/AppxManifest.xml index a10377c..d3ddf0a 100644 --- a/packaging/msix/AppxManifest.xml +++ b/packaging/msix/AppxManifest.xml @@ -25,7 +25,7 @@ diff --git a/packaging/msix/build-msix.ps1 b/packaging/msix/build-msix.ps1 index 2575dfd..9bad5df 100644 --- a/packaging/msix/build-msix.ps1 +++ b/packaging/msix/build-msix.ps1 @@ -160,9 +160,9 @@ $manifest = Get-Content (Join-Path $scriptDir "AppxManifest.xml") -Raw $manifest = $manifest.Replace("__IDENTITY_NAME__", $IdentityName) $manifest = $manifest.Replace("__PUBLISHER_ID__", $PublisherId) $manifest = $manifest.Replace("__PUBLISHER_DISPLAY_NAME__", $PublisherDisplayName) -# Case-sensitive so it targets Identity's Version="..." and NOT the lowercase -# version="1.0" in the declaration. -$manifest = $manifest -creplace 'Version="[\d.]+"', "Version=`"$Version`"" +# Token replace (not regex) so we only touch Identity's Version and never the +# declaration or TargetDeviceFamily Min/MaxVersion. +$manifest = $manifest.Replace("__VERSION__", $Version) Set-Content -Path (Join-Path $layout "AppxManifest.xml") -Value $manifest -Encoding UTF8 # --- 4. Pack -----------------------------------------------------------------