uwp - 如何在 DevOps 构建或发布管道中创建用于旁加载的自动更新 UWP 包?

标签 uwp msbuild azure-devops azure-pipelines azure-pipelines-release-pipeline

我一直在阅读 auto-updates for sideloaded UWP apps我想为我们的一个企业产品探索这种方法。我可以找到documentation用于生成 .appinstaller来自 Visual Studio,但我找不到从 DevOps/VSTS 生成它的文档。有没有办法做到这一点?也许是 MSBuild 的构建参数?还是发布管道中的任务?

我知道如果需要,我们可以使用 Visual Studio 或从头开始制作文件,但我们正在尝试更多地使用 DevOps 并减少本地构建。谢谢!

最佳答案

我能够为 Visual Studio 生成的构建打开诊断日志记录。在此过程中,我找到了以下 MSBuild 参数并将它们添加到我的 DevOps 构建管道中的构建任务中。我必须添加的新论点在下面以粗体显示。

/p:AppxPackageDir="$(Build.ArtifactStagingDirectory)\AppxPackages\"
/p:UapAppxPackageBuildMode=StoreUpload /p:AppxBundlePlatforms="$(BuildPlatform)" /p:AppxBundle=Always /p:GenerateAppInstallerFile=true /p:AppInstallerUri="http://localhost/MyPackageEndpoint" /p:AppInstallerUpdateFrequency=1 /p:AppInstallerCheckForUpdateFrequency=OnApplicationRun



有了这个,我的输出会生成 .appinstaller 文件。我唯一的问题是我必须指定 URI,当我将它部署到不同环境的不同 Web 服务器时,我必须手动更改。我可能会在发布管道中使用脚本来研究自动化。

关于uwp - 如何在 DevOps 构建或发布管道中创建用于旁加载的自动更新 UWP 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55232636/

相关文章:

c# - UWP 中的 ReadLinesAsync 从绝对文件路径

dependency-injection - IoC : ProjectReference with ReferenceOutputAssembly = false, 但仍然想要 nuget 包

azure-devops - Azure 开发运营 : where do artifacts live?

sonarqube - 使用 SonarQube 5.2 构建 Breaker 插件

Azure DevOps - 自动创建管道

Xaml 群岛 - Microsoft 入门示例不适合我

c++ - 在 UWP 中生成实时 Mp4

c# - 使用 WindowsXamlHost Overlay 托管 CaptureElement

msbuild - Nant 脚本无法生成 msbuild

MSBuild:它是什么?我什么时候需要它?