# Universal Windows Platform
# Build a Universal Windows Platform project using Visual Studio.
# Add steps that test and distribute an app, save build artifacts, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  buildPlatform: 'x86'
  buildConfiguration: 'Release'
  appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'

steps:
- task: VSBuild@1
  inputs:
    platform: 'x86'
    solution: '.\BGTask\BGTask.sln'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/restore /p:Platform=x86 /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=StoreUpload'

- task: VSBuild@1
  inputs:
    platform: 'x86'
    solution: '.\OfficeInterop\OfficeInterop.sln'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/restore /p:Platform=x86 /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=StoreUpload'

- task: VSBuild@1
  inputs:
    platform: 'x86'
    solution: '.\ShareTarget\ShareTarget.sln'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/restore /p:Platform=x86 /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=StoreUpload'

- task: VSBuild@1
  inputs:
    platform: 'x86'
    solution: '.\WinRT\WinRT.sln'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/restore /p:Platform=x86 /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:AppxPackageSigningEnabled=false /p:UapAppxPackageBuildMode=StoreUpload'