Configure CI/CD pipeline with YAML file - MSIX | Microsoft Learn

PHOTO EMBED

Tue Oct 11 2022 18:21:51 GMT+0000 (Coordinated Universal Time)

Saved by @frikke

- powershell: |
  [Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq")
  $doc = [System.Xml.Linq.XDocument]::Load(
    "$(Build.SourcesDirectory)/Msix/Package.appinstaller")
  $version = "$(major).$(minor).$(build).$(revision)"
  $doc.Root.Attribute("Version").Value = $version;
  $xName =
    [System.Xml.Linq.XName]
      "{http://schemas.microsoft.com/appx/appinstaller/2018}MainPackage"
  $doc.Root.Element($xName).Attribute("Version").Value = $version;
  $doc.Save("$(Build.ArtifactStagingDirectory)/MsixDesktopApp.appinstaller")
displayName: 'Version App Installer File'
content_copyCOPY

https://learn.microsoft.com/nb-no/windows/msix/desktop/azure-dev-ops