diff --git a/.ado/TestWACK.ps1 b/.ado/TestWACK.ps1 new file mode 100644 index 00000000000..0421f35f3a1 --- /dev/null +++ b/.ado/TestWACK.ps1 @@ -0,0 +1,26 @@ +param([string]$Platform, [string]$Configuration, [string]$OutputPath) + +$exceptions = @( + 'API __C_specific_handler in kernel32.dll is not supported for this application type. Microsoft.ReactNative.dll calls this API.' +); + +if (!(Test-Path $OutputPath)) { + mkdir -Path $OutputPath +} + +if ($Configuration -eq 'Release') { + $appxPath = Resolve-Path $PSScriptRoot\..\packages\playground\windows\AppPackages\playground\playground_1.0.0.0_${Platform}_Test\playground_1.0.0.0_$Platform.appx + gci $appxPath + + & "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\appcert.exe" test -appxpackagepath $appxPath -reportoutputpath $OutputPath\result.xml + + $xml = [xml] (gc $OutputPath\result.xml) + + $supportedApiTest = ($xml.REPORT.REQUIREMENTS.REQUIREMENT | Where-Object -Property TITLE -EQ "Supported API test").TEST; + $errors = $supportedApiTest.MESSAGES.MESSAGE.TEXT | Where-Object { $_ -notin $exceptions } + + if ($errors.Length -ne 0) { + throw $errors + } +} + diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 89049d94f61..21c2c58087f 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -261,7 +261,17 @@ jobs: /p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture) /p:PlatformToolset=$(MSBuildPlatformToolset) /p:BaseIntDir=$(BaseIntDir) - /p:AppxPackageSigningEnabled=false + + - powershell: .ado/TestWACK.ps1 $(BuildPlatform) $(BuildConfiguration) $(Build.StagingDirectory)\WACK + displayName: Test WACK + + - task: PublishBuildArtifacts@1 + displayName: Upload WACK report + condition: succeededOrFailed() + inputs: + pathtoPublish: '$(Build.StagingDirectory)/WACK' + artifactName: 'WACK report $(BuildPlatform) $(BuildConfiguration)' + - task: NuGetCommand@2 displayName: NuGet restore - Playground Win32 diff --git a/packages/playground/windows/playground/Package.appxmanifest b/packages/playground/windows/playground/Package.appxmanifest index 9e461608a9c..57381ff490f 100644 --- a/packages/playground/windows/playground/Package.appxmanifest +++ b/packages/playground/windows/playground/Package.appxmanifest @@ -7,8 +7,8 @@ IgnorableNamespaces="uap mp"> diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index 69cd5fe4443..deec2955767 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -16,7 +16,6 @@ 10.0.18362.0 10.0.16299.0 False - 867D41FE5091AED426000143497EA4DFC29A8097 Playground_TemporaryKey.pfx @@ -174,6 +173,15 @@ Samples/rntester.tsx + + True + False + SHA256 + True + True + Never + 0 + @@ -194,5 +202,6 @@ - + + diff --git a/packages/playground/windows/playground/Playground_TemporaryKey.pfx b/packages/playground/windows/playground/Playground_TemporaryKey.pfx index a65eac5d773..328efc71c52 100644 Binary files a/packages/playground/windows/playground/Playground_TemporaryKey.pfx and b/packages/playground/windows/playground/Playground_TemporaryKey.pfx differ