Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create auto-updating UWP package for sideloading in DevOps build or release pipelines?

I've been reading about auto-updates for sideloaded UWP apps and I'd like to explore this approach for one of our enterprise products. I can find documentation for generating the .appinstaller from Visual Studio, but I cannot find documentation for generating it from DevOps/VSTS. Is there a way to do this? Perhaps a build parameter to MSBuild? Or a task in a release pipeline?

I know that we can use Visual Studio or make the file from scratch if we have to, but we are trying to use DevOps more and local builds less. Thanks!

like image 735
NSouth Avatar asked Jan 27 '23 14:01

NSouth


1 Answers

I was able to turn on diagnostic logging for the build generated by Visual Studio. In doing so, I found the following MSBuild Arguments and added them to the build task in my DevOps build pipeline. The new arguments I had to add are bold below.

/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

With this, my output generates the .appinstaller file. My only issue is that I have to specify the URI, which I will have to manually change when I deploy this to different web servers for different environments. I might look into automated this with a script in a release pipeline.

like image 191
NSouth Avatar answered Jan 29 '23 23:01

NSouth