Skip to content

Commit 515a453

Browse files
committed
Add 'PhoneIdentity' to the AppxManifest.xml file
1 parent 19f9297 commit 515a453

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

assets/AppxManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@
4848
<rescap:Capability Name="packageManagement" />
4949
<rescap:Capability Name="packageQuery" />
5050
</Capabilities>
51+
<mp:PhoneIdentity PhoneProductId="$PHONEPRODUCTID$" PhonePublisherId="95d94207-0c7c-47ed-82db-d75c81153c35" />
5152
</Package>

tools/packaging/packaging.psm1

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3707,8 +3707,17 @@ function New-MSIXPackage
37073707

37083708
$ProductVersion = Get-WindowsVersion -PackageName $packageName
37093709

3710+
# Any app that is submitted to the Store must have a PhoneIdentity in its appxmanifest.
3711+
# If you submit a package without this information to the Store, the Store will silently modify your package to include it.
3712+
# To find the PhoneProductId value, you need to run a package through the Store certification process,
3713+
# and use the PhoneProductId value from the Store certified package to update the manifest in your source code.
3714+
# This is the PhoneProductId for the "Microsoft.PowerShell" package.
3715+
$PhoneProductId = "5b3ae196-2df7-446e-8060-94b4ad878387"
3716+
37103717
$isPreview = Test-IsPreview -Version $ProductSemanticVersion
37113718
if ($isPreview) {
3719+
# This is the PhoneProductId for the "Microsoft.PowerShellPreview" package.
3720+
$PhoneProductId = "67859fd2-b02a-45be-8fb5-62c569a3e8bf"
37123721
Write-Verbose "Using Preview assets" -Verbose
37133722
}
37143723

@@ -3718,7 +3727,14 @@ function New-MSIXPackage
37183727
$releasePublisher = 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'
37193728

37203729
$appxManifest = Get-Content "$RepoRoot\assets\AppxManifest.xml" -Raw
3721-
$appxManifest = $appxManifest.Replace('$VERSION$', $ProductVersion).Replace('$ARCH$', $Architecture).Replace('$PRODUCTNAME$', $productName).Replace('$DISPLAYNAME$', $displayName).Replace('$PUBLISHER$', $releasePublisher)
3730+
$appxManifest = $appxManifest
3731+
.Replace('$VERSION$', $ProductVersion)
3732+
.Replace('$ARCH$', $Architecture)
3733+
.Replace('$PRODUCTNAME$', $productName)
3734+
.Replace('$DISPLAYNAME$', $displayName)
3735+
.Replace('$PUBLISHER$', $releasePublisher)
3736+
.Replace('$PHONEPRODUCTID$', $PhoneProductId)
3737+
37223738
$xml = [xml]$appxManifest
37233739
if ($isPreview) {
37243740
Write-Verbose -Verbose "Adding pwsh-preview.exe alias"

0 commit comments

Comments
 (0)