Using ProcessorArchitecture from PackageLayout instead of AppxManifest

%3CLINGO-SUB%20id%3D%22lingo-sub-2612743%22%20slang%3D%22en-US%22%3EUsing%20ProcessorArchitecture%20from%20PackageLayout%20instead%20of%20AppxManifest%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2612743%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20%3CPACKAGE%3E%20element%20in%20PackageLayout.xml%20is%20documented%20to%20take%20a%20ProcessorArchitecture%3A%3C%2FPACKAGE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fpackage%2Fpackaging-layout%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fpackage%2Fpackaging-layout%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20no%20matter%20what%20I%20try%20for%20ProcessorArchitecture%2C%20MakeAppx%20will%20always%20generate%20the%20package%20as%20Neutral.%20And%20if%20I%20have%20two%20%3CPACKAGE%3E%20elements%20in%20the%20%3CPACKAGEFAMILY%3E%20with%20a%20different%20ProcessorArchitecture%2C%20it%20will%20complain%20that%20I%20have%20two%20Neutral%20packages%20in%20the%20PackageFamily.%3C%2FPACKAGEFAMILY%3E%3C%2FPACKAGE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20on%20the%20other%20I%20specify%20the%20ProcessorArchitecture%20inside%20the%20AppxManifest%20under%20%3CIDENTITY%3E%20it%20works%20fine%2C%20but%20then%20I%20need%20to%20jump%20through%20various%20hoops%20to%20build%20things.%3C%2FIDENTITY%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20does%20one%20get%20the%20ProcessorArchitecture%20to%20work%20as%20documented%20inside%20PackageLayout.xml%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2642379%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20ProcessorArchitecture%20from%20PackageLayout%20instead%20of%20AppxManifest%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2642379%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1115739%22%20target%3D%22_blank%22%3E%40deonb1%3C%2FA%3E%26nbsp%3Bthank%20you%20for%20your%20question.%20I%20am%20looking%20into%20this.%20Could%20you%20please%20share%20the%20exact%20error%20message%3F%26nbsp%3BAlso%20what%20version%20of%20windows%20SDK%20do%20you%20have%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2658157%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20ProcessorArchitecture%20from%20PackageLayout%20instead%20of%20AppxManifest%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2658157%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1115739%22%20target%3D%22_blank%22%3E%40deonb1%3C%2FA%3E%26nbsp%3B%20Does%20the%20source%20manifest%20(the%20file%20specified%20in%20the%20ManifestPath%20attribute)%20contain%20a%20ProcessorArchitecture%20attribute%20under%20the%20%3CIDENTITY%3E%20element%3F%20If%20not%2C%20try%20adding%20one%20there.%20The%20value%20doesn't%20matter%20since%20it'll%20be%20replaced%20when%20building%20the%20packaging%20layout.%3C%2FIDENTITY%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20might%20be%20happening%20is%2C%20the%20ProcessorArchitecture%20specified%20in%20PackagingLayout%20only%20replaces%20an%20existing%20value%20in%20the%20source%20manifest%2C%20but%20it%20does%20not%20add%20one%20if%20it's%20not%20specified.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Visitor

The <Package> element in PackageLayout.xml is documented to take a ProcessorArchitecture:

 

https://docs.microsoft.com/en-us/windows/msix/package/packaging-layout

 

However, no matter what I try for ProcessorArchitecture, MakeAppx will always generate the package as Neutral. And if I have two <Package> elements in the <PackageFamily> with a different ProcessorArchitecture, it will complain that I have two Neutral packages in the PackageFamily.

 

If on the other I specify the ProcessorArchitecture inside the AppxManifest under <Identity> it works fine, but then I need to jump through various hoops to build things.

 

How does one get the ProcessorArchitecture to work as documented inside PackageLayout.xml?

2 Replies
@deonb1 thank you for your question. I am looking into this. Could you please share the exact error message? Also what version of windows SDK do you have?

@deonb1  Does the source manifest (the file specified in the ManifestPath attribute) contain a ProcessorArchitecture attribute under the <Identity> element? If not, try adding one there. The value doesn't matter since it'll be replaced when building the packaging layout.

 

What might be happening is, the ProcessorArchitecture specified in PackagingLayout only replaces an existing value in the source manifest, but it does not add one if it's not specified.