Build with Visual Studio 2022 (#1793)
- Use Visual Studio 2022 - Use an Azure Pipelines image which has Visual Studio 2022 installed - Use the v143 C++ build tools - Use the Windows SDK version 22000 - Raise the minimum platform version to 17763 - As a consequence of this change, we will use the "msix" file extension instead of "appx" for our packages - Update UI tests from .NET Core 2.1 to .NET Core 3.1
This commit is contained in:
@@ -49,4 +49,4 @@ jobs:
|
||||
parameters:
|
||||
platform: x86
|
||||
|
||||
- template: ./templates/package-appxbundle.yaml
|
||||
- template: ./templates/package-msixbundle.yaml
|
||||
|
@@ -48,4 +48,4 @@ jobs:
|
||||
parameters:
|
||||
platform: x86
|
||||
|
||||
- template: ./templates/package-appxbundle.yaml
|
||||
- template: ./templates/package-msixbundle.yaml
|
||||
|
@@ -44,7 +44,7 @@ jobs:
|
||||
parameters:
|
||||
platform: x86
|
||||
|
||||
- template: ./templates/package-appxbundle.yaml
|
||||
- template: ./templates/package-msixbundle.yaml
|
||||
parameters:
|
||||
signBundle: true
|
||||
createStoreBrokerPackages: true
|
||||
|
@@ -11,7 +11,7 @@ jobs:
|
||||
displayName: Build ${{ parameters.platform }}
|
||||
condition: ${{ parameters.condition }}
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
vmImage: windows-2022
|
||||
variables:
|
||||
BuildConfiguration: Release
|
||||
BuildPlatform: ${{ parameters.platform }}
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
displayName: 'Build solution src/Calculator.sln'
|
||||
inputs:
|
||||
solution: src/Calculator.sln
|
||||
vsVersion: 16.0
|
||||
vsVersion: 17.0
|
||||
msbuildArgs: /bl:$(Build.BinariesDirectory)\$(BuildConfiguration)\$(BuildPlatform)\Calculator.binlog /p:OutDir=$(Build.BinariesDirectory)\$(BuildConfiguration)\$(BuildPlatform)\ /p:GenerateProjectSpecificOutputFolder=true /p:Version=$(Build.BuildNumber) /t:Publish /p:PublishDir=$(Build.BinariesDirectory)\$(BuildConfiguration)\$(BuildPlatform)\publish\ $(ExtraMSBuildArgs)
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# This template contains a job which takes .appx packages which were built separately for each
|
||||
# architecture (arm, x86, etc.) and combines them into a single .appxbundle. In release builds,
|
||||
# This template contains a job which takes .msix packages which were built separately for each
|
||||
# architecture (arm, x86, etc.) and combines them into a single .msixbundle. In release builds,
|
||||
# this job also signs the bundle and creates StoreBroker packages.
|
||||
|
||||
parameters:
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
in(dependencies.BuildARM.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
|
||||
)
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
vmImage: windows-2022
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
StoreBrokerMediaRootPath: $(TEMP)\SBMedia
|
||||
@@ -30,10 +30,10 @@ jobs:
|
||||
fetchDepth: 1
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download all .appx artifacts
|
||||
displayName: Download all .msix artifacts
|
||||
inputs:
|
||||
artifactName: drop
|
||||
itemPattern: '**/*.appx'
|
||||
itemPattern: '**/*.msix'
|
||||
|
||||
- ${{ if eq(parameters.createStoreBrokerPackages, true) }}:
|
||||
- task: UniversalPackages@0
|
||||
@@ -46,41 +46,41 @@ jobs:
|
||||
vstsPackageVersion: 0.0.67
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Generate AppxBundle mapping
|
||||
displayName: Generate MsixBundle mapping
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)\build\scripts\CreateAppxBundleMapping.ps1
|
||||
arguments: '-InputPath $(Build.ArtifactStagingDirectory)\drop\Release -ProjectName Calculator -OutputFile $(Build.BinariesDirectory)\AppxBundleMapping.txt'
|
||||
filePath: $(Build.SourcesDirectory)\build\scripts\CreateMsixBundleMapping.ps1
|
||||
arguments: '-InputPath $(Build.ArtifactStagingDirectory)\drop\Release -ProjectName Calculator -OutputFile $(Build.BinariesDirectory)\MsixBundleMapping.txt'
|
||||
|
||||
- powershell: |
|
||||
$buildVersion = [version]$Env:BUILDVERSION
|
||||
$bundleVersion = "2021.$($buildVersion.Minor).$($buildVersion.Build).$($buildVersion.Revision)"
|
||||
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86\MakeAppx.exe" bundle /v /bv $bundleVersion /f $Env:MAPPINGFILEPATH /p $Env:OUTPUTPATH
|
||||
displayName: Make AppxBundle
|
||||
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\MakeAppx.exe" bundle /v /bv $bundleVersion /f $Env:MAPPINGFILEPATH /p $Env:OUTPUTPATH
|
||||
displayName: Make MsixBundle
|
||||
env:
|
||||
BUILDVERSION: $(Build.BuildNumber)
|
||||
MAPPINGFILEPATH: $(Build.BinariesDirectory)\AppxBundleMapping.txt
|
||||
OUTPUTPATH: $(Build.BinariesDirectory)\Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
MAPPINGFILEPATH: $(Build.BinariesDirectory)\MsixBundleMapping.txt
|
||||
OUTPUTPATH: $(Build.BinariesDirectory)\Microsoft.WindowsCalculator_8wekyb3d8bbwe.msixbundle
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy AppxBundle to staging directory
|
||||
displayName: Copy MsixBundle to staging directory
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)
|
||||
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\appxBundle
|
||||
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.msixbundle
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\msixBundle
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish AppxBundle artifact
|
||||
displayName: Publish MsixBundle artifact
|
||||
inputs:
|
||||
artifactName: appxBundle
|
||||
pathToPublish: $(Build.ArtifactStagingDirectory)\appxBundle
|
||||
artifactName: msixBundle
|
||||
pathToPublish: $(Build.ArtifactStagingDirectory)\msixBundle
|
||||
|
||||
- ${{ if eq(parameters.signBundle, true) }}:
|
||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||
displayName: Send appxbundle to code signing service
|
||||
displayName: Send msixbundle to code signing service
|
||||
inputs:
|
||||
ConnectedServiceName: Essential Experiences Codesign
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)\appxBundle
|
||||
Pattern: Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
FolderPath: $(Build.ArtifactStagingDirectory)\msixBundle
|
||||
Pattern: Microsoft.WindowsCalculator_8wekyb3d8bbwe.msixbundle
|
||||
signConfigType: inlineSignParams
|
||||
inlineOperation: |
|
||||
[
|
||||
@@ -109,10 +109,10 @@ jobs:
|
||||
}
|
||||
]
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish AppxBundleSigned artifact
|
||||
displayName: Publish MsixBundleSigned artifact
|
||||
inputs:
|
||||
pathtoPublish: $(Build.ArtifactStagingDirectory)\appxBundle
|
||||
artifactName: appxBundleSigned
|
||||
pathtoPublish: $(Build.ArtifactStagingDirectory)\msixBundle
|
||||
artifactName: msixBundleSigned
|
||||
|
||||
- ${{ if eq(parameters.createStoreBrokerPackages, true) }}:
|
||||
- powershell: |
|
||||
@@ -139,8 +139,8 @@ jobs:
|
||||
inputs:
|
||||
serviceEndpoint: Calculator StoreBroker Connection
|
||||
sbConfigPath: Tools/Build/StoreBroker/SBCalculatorConfig.json
|
||||
sourceFolder: $(Build.ArtifactStagingDirectory)/appxBundle
|
||||
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
sourceFolder: $(Build.ArtifactStagingDirectory)/msixBundle
|
||||
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.msixbundle
|
||||
pdpPath: $(Build.SourcesDirectory)\PDP
|
||||
pdpInclude: PDP.xml
|
||||
pdpMediaPath: $(StoreBrokerMediaRootPath)
|
@@ -4,7 +4,7 @@ jobs:
|
||||
- job: ReleaseStore
|
||||
dependsOn: Package
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
vmImage: windows-2022
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
StoreBrokerPackagePath: $(Build.ArtifactStagingDirectory)\storeBrokerPayload
|
||||
|
@@ -5,30 +5,30 @@ jobs:
|
||||
- job: ReleaseVPack
|
||||
dependsOn: Package
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
vmImage: windows-2022
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
steps:
|
||||
- checkout: none
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download appxBundleSigned artifact
|
||||
displayName: Download msixBundleSigned artifact
|
||||
inputs:
|
||||
artifactName: appxBundleSigned
|
||||
artifactName: msixBundleSigned
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: Copy signed AppxBundle to vpack staging folder
|
||||
displayName: Copy signed MsixBundle to vpack staging folder
|
||||
inputs:
|
||||
sourceFolder: $(Build.ArtifactStagingDirectory)\appxBundleSigned
|
||||
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\vpack\appxBundle
|
||||
sourceFolder: $(Build.ArtifactStagingDirectory)\msixBundleSigned
|
||||
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.msixbundle
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\vpack\msixBundle
|
||||
|
||||
- task: PkgESVPack@12
|
||||
displayName: Create and push vpack for app
|
||||
env:
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
inputs:
|
||||
sourceDirectory: $(Build.ArtifactStagingDirectory)\vpack\appxBundle
|
||||
sourceDirectory: $(Build.ArtifactStagingDirectory)\vpack\msixBundle
|
||||
description: VPack for the Calculator Application
|
||||
pushPkgName: calculator.app
|
||||
version: $(versionMajor).$(versionMinor).$(versionBuild)
|
||||
|
@@ -10,7 +10,7 @@ jobs:
|
||||
dependsOn: Build${{ parameters.platform }}
|
||||
condition: succeeded()
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
vmImage: windows-2022
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
steps:
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download AppxBundle and CalculatorUITests
|
||||
displayName: Download MsixBundle and CalculatorUITests
|
||||
inputs:
|
||||
artifactName: drop
|
||||
itemPattern: |
|
||||
@@ -44,7 +44,6 @@ jobs:
|
||||
displayName: Run CalculatorUITests
|
||||
inputs:
|
||||
testAssemblyVer2: $(Build.ArtifactStagingDirectory)/drop/Release/${{ parameters.platform }}/publish/CalculatorUITests.dll
|
||||
vsTestVersion: 16.0
|
||||
runSettingsFile: $(Build.ArtifactStagingDirectory)/drop/Release/${{ parameters.platform }}/publish/${{ parameters.runsettingsFileName }}
|
||||
platform: ${{ parameters.platform }}
|
||||
configuration: Release
|
||||
|
@@ -10,7 +10,7 @@ jobs:
|
||||
dependsOn: Build${{ parameters.platform }}
|
||||
condition: succeeded()
|
||||
pool:
|
||||
vmImage: windows-2019
|
||||
vmImage: windows-2022
|
||||
variables:
|
||||
skipComponentGovernanceDetection: true
|
||||
steps:
|
||||
@@ -31,5 +31,5 @@ jobs:
|
||||
- task: VSTest@2
|
||||
displayName: Run CalculatorUnitTests
|
||||
inputs:
|
||||
testAssemblyVer2: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.appx
|
||||
testAssemblyVer2: $(Build.ArtifactStagingDirectory)\drop\Release\${{ parameters.platform }}\CalculatorUnitTests\AppPackages\CalculatorUnitTests_Test\CalculatorUnitTests.msix
|
||||
otherConsoleOptions: /Platform:${{ parameters.platform }}
|
@@ -10,26 +10,26 @@
|
||||
ARM\
|
||||
Project\
|
||||
AppPackages\
|
||||
Project_ARM.appx
|
||||
Project_scale-100.appx
|
||||
Project_ARM.msix
|
||||
Project_scale-100.msix
|
||||
x64\
|
||||
Project\
|
||||
AppPackages\
|
||||
Project_x64.appx
|
||||
Project_scale-100.appx
|
||||
Project_x64.msix
|
||||
Project_scale-100.msix
|
||||
|
||||
.PARAMETER InputPath
|
||||
The path where appx packages to bundle are located.
|
||||
The path where msix packages to bundle are located.
|
||||
|
||||
.PARAMETER ProjectName
|
||||
The folder name within each architecture to search recursively for appx packages. The appx files
|
||||
The folder name within each architecture to search recursively for msix packages. The msix files
|
||||
must also have the ProjectName in their file names.
|
||||
|
||||
.PARAMETER OutputFile
|
||||
The path to write the generated mapping file.
|
||||
|
||||
.EXAMPLE
|
||||
Create-AppxBundleMapping -InputPath "C:\drop" -ProjectName "CalculatorApp" -OutputFile "C:\Temp\AppxBundleMapping.txt"
|
||||
Create-MsixBundleMapping -InputPath "C:\drop" -ProjectName "CalculatorApp" -OutputFile "C:\Temp\MsixBundleMapping.txt"
|
||||
#>
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
@@ -45,7 +45,7 @@ param(
|
||||
$OutputFile
|
||||
)
|
||||
|
||||
# List all appx packages by architecture
|
||||
# List all msix packages by architecture
|
||||
$architectures = @(Get-ChildItem -Path $InputPath -Directory | Foreach-Object Name | Foreach-Object ToLower)
|
||||
if ($architectures.Count -lt 1)
|
||||
{
|
||||
@@ -57,22 +57,22 @@ $packages = @{}
|
||||
foreach ($architecture in $architectures)
|
||||
{
|
||||
$projectPath = [IO.Path]::Combine($InputPath, $architecture, $ProjectName)
|
||||
$packages[$architecture] = Get-ChildItem -Path $projectPath -Recurse -Filter *$ProjectName*.appx
|
||||
$packages[$architecture] = Get-ChildItem -Path $projectPath -Recurse -Filter *$ProjectName*.msix
|
||||
|
||||
if ($packages[$architecture].Count -lt 1)
|
||||
{
|
||||
throw "No .appx files found for architecture $architecture in $projectPath"
|
||||
throw "No .msix files found for architecture $architecture in $projectPath"
|
||||
}
|
||||
}
|
||||
|
||||
# List appx packages which are common to all architectures
|
||||
# List msix packages which are common to all architectures
|
||||
$commonPackages = $packages[$defaultArchitecture]
|
||||
foreach ($architecture in $architectures)
|
||||
{
|
||||
$commonPackages = $packages[$architecture] | Where {$commonPackages.Name -Contains $_.Name}
|
||||
}
|
||||
|
||||
# List appx packages which are architecture-specific and verify that there is exactly one per
|
||||
# List msix packages which are architecture-specific and verify that there is exactly one per
|
||||
# architecture.
|
||||
$architectureSpecificPackages = @()
|
||||
if ($architectures.Count -gt 1)
|
Reference in New Issue
Block a user