I have a Xamarin.Forms application which targets iOS, Android and UWP. I have built an Azure pipeline that generates my .ipa
and .apk
files which can be used to install on devices that support its debugging. However for UWP I am trying to generate a build that will allow side installation (not for the app store), but not sure how to do this.
In visual studio there is the option to "create app package" (see screenshot below) which generates a bunch of files including an install.ps1
script. And running this script installs the application on my machine. I would like to automate this process in my Azure Devops pipeline but not sure how to. Any help would be appreciated.
Figured out how to do this.
I used the following MSBuild Arguments in my Build solution Task:
/p:AppxBundlePlatforms="x86|x64|ARM"
/p:AppxPackageDir="$(System.DefaultWorkingDirectory)\AppxPackages\\"
/p:AppxBundle=Always
/p:UapAppxPackageBuildMode=SideloadOnly
/p:AppxPackageSigningEnabled=true
/p:PackageCertificateThumbprint="$(UWPThumbPrint)"
/p:PackageCertificateKeyFile="$(UWPCertificate.secureFilePath)"
/p:PackageCertificatePassword="$(UWPCertificatePassword)"
$(System.DefaultWorkingDirectory) may be replaced with $(Build.ArtifactStagingDirectory) if you are using an Azure machine. See this link for information on Build Arguments.
I am then able to archive the contents of $(System.DefaultWorkingDirectory)/AppxPackages with an Archive task.