Skip to content

Commit

Permalink
Assume neutral architecture when none is specified
Browse files Browse the repository at this point in the history
Per the [MSDN documentation](https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-identity),
`neutral` is the default value for `ProcessorArchitecture`.

Updating our Appx metadata reading logic to assume `neutral` when none is specified.

This will avoid a later exception in `Get-FormattedFilename` that does Metadata table validation.

Resolves Issue 89
  • Loading branch information
HowardWolosky committed Jan 16, 2018
1 parent 06d1fe4 commit 4405654
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions StoreBroker/PackageTool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,11 @@ function Read-AppxMetadata

$metadata.version = $manifest.Package.Identity.Version
$metadata.architecture = $manifest.Package.Identity.ProcessorArchitecture
if ([String]::IsNullOrWhiteSpace($metadata.architecture))
{
$metadata.architecture = "neutral"
}

$metadata.targetPlatform = Get-TargetPlatform -AppxManifestPath $appxManifest
$metadata.name = $manifest.Package.Identity.Name -creplace '^Microsoft\.', ''

Expand Down
2 changes: 1 addition & 1 deletion StoreBroker/StoreBroker.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
CompanyName = 'Microsoft Corporation'
Copyright = 'Copyright (C) Microsoft Corporation. All rights reserved.'

ModuleVersion = '1.12.3'
ModuleVersion = '1.12.4'
Description = 'Provides command-line access to the Windows Store Submission REST API.'

RootModule = 'StoreIngestionApi'
Expand Down

0 comments on commit 4405654

Please sign in to comment.