Package.Current.Id reflects the package Visual Studio actually deployed, so inspect and correct that package’s generated AppxManifest.xml and signing certificate—not Package.StoreAssociation.xml or the source manifest alone.
A Package Family Name (PFN) is calculated as <Name>_<PublisherId>, and PublisherId is derived from the package’s Publisher. It is not a value stored directly in Package.appxmanifest.^1^ Therefore, abec5f3fz36bm means the deployed Debug package has a different effective publisher from the Store-associated package.
1. Compare the deployed and generated identities
With the incorrect Debug build installed, run:
Get-AppxPackage |
Where-Object PackageFamilyName -like "60xxx.MyApp_*" |
Select-Object Name, Publisher, PackageFamilyName,
PackageFullName, InstallLocation
Get-AppxPackage reports the signed packages currently registered on the machine.^2^
For the entry ending in abec5f3fz36bm:
- Open the reported
InstallLocation.
- Inspect its
AppxManifest.xml.
- Record the
<Identity Name="..." Publisher="..."> values.
- Also inspect the generated
AppxManifest.xml under the active Debug architecture’s bin/Appx output.
The generated AppxManifest.xml, rather than the editable Package.appxmanifest, is what Visual Studio deploys. Visual Studio can populate its identity differently depending on Store association, developer-account sign-in, and the test certificate.^3^
2. Restore the Store identity at the packaging-project boundary
Obtain the authoritative values from Partner Center:
Partner Center → app → Product management → Product identity
Compare these three values with the generated manifest:
-
Package/Identity/Name
-
Package/Identity/Publisher
-
Package/Properties/PublisherDisplayName
Those values establish the package family.^4^
Then, in the Windows Application Packaging Project used for F5:
- Open
Package.appxmanifest → Packaging.
- Confirm Package name and Publisher exactly match Partner Center.
- Select Choose Certificate.
- Choose a development certificate whose Subject exactly matches the manifest’s
Publisher.
- In Configuration Manager, confirm that this packaging project is both Build and Deploy for the active Debug/platform configuration.
- Set that packaging project as the startup project, rebuild, and deploy it.
The certificate subject must match the manifest publisher.^5^ Visual Studio’s Store association normally updates the packaging fields automatically, but creating a sideload package can select a different test certificate for that packaging project.^6^
You can inspect the currently selected certificate before replacing it:
(Get-PfxCertificate "C:\path\to\current-test-certificate.pfx").Subject
If its subject differs from Partner Center’s Publisher, it cannot produce the same Store PFN.^7^
3. Remove the incorrectly registered Debug identity
After fixing the generated manifest and certificate, remove only the package ending in abec5f3fz36bm before deploying again:
Get-AppxPackage |
Where-Object PackageFamilyName -eq "60xxx.MyApp_abec5f3fz36bm" |
Remove-AppxPackage
Warning: removing that package registration can remove package-scoped local application data; back up test data first.
Do not remove the Store-installed package ending in npmxxxxx. Package removal first deletes the current user’s registration; staged payload cleanup can occur later.^8^
Deploy from Visual Studio again, then verify at runtime:
var id = Windows.ApplicationModel.Package.Current.Id;
System.Diagnostics.Debug.WriteLine($"Name: {id.Name}");
System.Diagnostics.Debug.WriteLine($"Publisher: {id.Publisher}");
System.Diagnostics.Debug.WriteLine($"PublisherId: {id.PublisherId}");
System.Diagnostics.Debug.WriteLine($"FamilyName: {id.FamilyName}");
System.Diagnostics.Debug.WriteLine($"FullName: {id.FullName}");
If the generated AppxManifest.xml has the Store Name and Publisher, but F5 still installs abec5f3fz36bm, Visual Studio is deploying a different packaging project or configuration. The InstallLocation, generated manifest path, active startup project, and Configuration Manager → Deploy selection will identify that mismatch.
References
- An overview of Package Identity in Windows apps
- Managing MSIX with PowerShell
- How Visual Studio generates an app package manifest
- View product identity details
- Create a certificate for package signing
- Package a desktop or UWP app in Visual Studio
- Known Issues with packaged desktop apps
- Package registration and lifetime