使用VSTS Task将UWP App分发到App Center(又名Mobile Center) [英] Distribute UWP App to App Center (aka Mobile Center) using VSTS Task

查看:92
本文介绍了使用VSTS Task将UWP App分发到App Center(又名Mobile Center)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在与Microsoft合作,以解决您的UWP应用程序之一在启动后崩溃的情况.经过围绕msbuild的大量调试之后,我认识到,仅当将生成的appxbundle文件分布在Microsoft App Center(又称为Mobile Center)上时,才会发生崩溃.仅当使用内置任务"App Center分发"中的VSTS将appxbundle上传到App Center时,才是这种情况.

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 crash only occurs when the resulting appxbundle file is distributed over Microsoft App Center (aka Mobile Center). This is also only the case when the appxbundle is uploaded to App Center with the VSTS built in task "App Center distribute".

当我使用App Center门户手动上传appxbundle时,即使通过App Center进行消费,一切也都可以正常工作.

When I upload the appxbundle manually using the App Center Portal it all works fine, even when consumed through App Center.

此外,我注意到构建后,appxbundle的大小为18MB,但使用VSTS任务上传到App Center时,大小仅为14MB(大小在App Center门户中显示).下载后该文件没有损坏,但似乎丢失了捆绑软件中的某些文件-该任务在做什么?打开和修改appxbundle?嗯.

Furthermore I noticed that the appxbundle is 18MB in size after build, but is only 14MB in size when uploaded to App Center using the VSTS task (size is shown in App Center Portal). The file is not corrupt after a download but it seems to miss some files in the bundle - what is this task doing? Opening and modifying the appxbundle? uhhhhhh.

有人遇到类似的问题吗?

Anybody having a similar issue?

推荐答案

我暂时已解决此问题,方法是将内置任务替换为App Center CLI,并使用简单的Powershell脚本对其进行存档.

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.

在存在NPM软件包管理器的构建代理上,只需运行npm install -g appcenter-cli即可安装最新版本.之后,以上脚本应执行.

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.

这篇关于使用VSTS Task将UWP App分发到App Center(又名Mobile Center)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆