Distribute UWP App to App Center (aka Mobile Center) using VSTS Task

后端 未结 2 1950
广开言路
广开言路 2021-01-06 03:55

I\'m currently working together with Microsoft on a case where one of your UWP Apps is crashing after start. After a lot of debugging around msbuild I recognized that the cr

相关标签:
2条回答
  • 2021-01-06 04:51

    I've worked around this issue for the moment by replacing the built-in task with the App Center CLI and a simple powershell script to archive the same.

    param(
        [Parameter(Mandatory=$true)]
        [String]
        $Token,
        # Name of the App, e.g. 'org/app'
        [Parameter(Mandatory=$true)]
        [String]
        $App,
        # Name of the distribution Group, e.g. 'Collaborators'
        [Parameter(Mandatory=$true)]
        [String]
        $Group
    )
    
    $binaryFile = (Get-ChildItem MyApp_*_x64.appxbundle -Recurse).FullName
    appcenter distribute release -g $Group -f "$binaryFile" -a $App --debug --token $Token
    

    To make this script work, you need the latest version of App Center CLI which can be found here.

    On a build agent with NPM package manager present, you can simply run npm install -g appcenter-cli to install the latest version. Afterwards the above script should execute.

    0 讨论(0)
  • 2021-01-06 04:53

    I used @SebastianZolg's solution this way:

    - task: PowerShell@2
    displayName: 'Distribute via AppCenter'
    inputs:
        targetType: 'filePath'
        filePath: 'AppCenterDistributeThroughCli.ps1'
        arguments: xxxMyTokenxxxxx MyAppCenterAppSlug "Collaborators"
        workingDirectory: '$(Build.ArtifactStagingDirectory)\AppxPackages'
    

    And AppCenterDistributeThroughCli.ps1 is @SebastianZolg's script.

    0 讨论(0)
提交回复
热议问题