May 08, 2019 The downside: UWP apps would work on Windows 10-based devices only. Developers would have to do work to get their apps to be UWP/Store-ready. And Win32 apps wouldn't get UWP features like touch. However: because UWP has a reasonably well-defined API, it’s theoretically possible to build a wine-like UWP host running.Net Core in any Linux-flavored GUI shell. That would be a huge undertaking, but if Microsoft ever felt the need to target Linux for their store, they might do it. I doubt it, though.
-->
You can use Azure Pipelines to create automated builds for UWP projects. In this article, we’ll look at different ways to do this. We’ll also show you how to perform these tasks by using the command line so that you can integrate with any other build system.
Create a new Azure Pipeline
Begin by signing up for Azure Pipelines if you haven't done so already.
Next, create a pipeline that you can use to build your source code. For a tutorial about building a pipeline to build a GitHub repository, see Create your first pipeline. Azure Pipelines supports the repository types listed in this article.
Set up an automated build
We’ll start with the default UWP build definition that’s available in Azure Dev Ops and then show you how to configure the pipeline.
Build Uwp Apps On Mac Iphone
In the list of build definition templates, choose the Universal Windows Platform template.
This template includes the basic configuration to build your UWP project:
The default template tries to sign the package with the certificate specified in the .csproj file. If you want to sign your package during the build you must have access to the private key. Otherwise, you can disable signing by adding the parameter
/p:AppxPackageSigningEnabled=false to the msbuildArgs section in the YAML file.
Add your project certificate to the Secure files library
You should avoid submitting certificates to your repo if at all possible, and git ignores them by default. To manage the safe handling of sensitive files like certificates, Azure DevOps supports the secure files feature.
To upload a certificate for your automated build:
Note
Starting in Visual Studio 2019, a temporary certificate is no longer generated in UWP projects. To create or export certificates, use the PowerShell cmdlets described in this article.
Configure the Build solution build task
This task compiles any solution that’s in the working folder to binaries and produces the output app package file. This task uses MSBuild arguments. You’ll have to specify the value of those arguments. Use the following table as a guide.
Configure the buildUwp Get Mac Address
If you want to build your solution by using the command line, or by using any other build system, run MSBuild with these arguments.
Build Uwp Apps On Mac DownloadConfigure package signing
To sign the MSIX (or .appx) package the pipeline needs to retrieve the signing certificate. To do this, add a DownloadSecureFile task prior to the VSBuild task.This will give you access to the signing certificate via
signingCert .
Next, update the VSBuild task to reference the signing certificate:
Note
The PackageCertificateThumbprint argument is intentionally set to an empty string as a precaution. If the thumbprint is set in the project but does not match the signing certificate, the build will fail with the error:
Certificate does not match supplied signing thumbprint .
Review parameters
The parameters defined with the
$() syntax are variables defined in the build definition, and will change in other build systems.
To view all predefined variables, see Predefined build variables.
Build Uwp Apps On Mac Download![]() Configure the Publish Build Artifacts task
The default UWP pipeline does not save the generated artifacts. To add the publish capabilities to your YAML definition, add the following tasks.
You can see the generated artifacts in the Artifacts option of the build results page.
Because we’ve set the
UapAppxPackageBuildMode argument to StoreUpload , the artifacts folder includes the package for submission to the Store (.msixupload/.appxupload). Note that you can also submit a regular app package (.msix/.appx) or an app bundle (.msixbundle/.appxbundle/) to the Store. For the purposes of this article, we'll use the .appxupload file.
Address bundle errors
If you add more than one UWP project to your solution and then try to create a bundle, you might receive an error like this one.
MakeAppx(0,0): Error : Error info: error 80080204: The package with file name 'AppOne.UnitTests_0.1.2595.0_x86.appx' and package full name '8ef641d1-4557-4e33-957f-6895b122f1e6_0.1.2595.0_x86__scrj5wvaadcy6' is not valid in the bundle because it has a different package family name than other packages in the bundle
This error appears because at the solution level, it’s not clear which app should appear in the bundle. To resolve this issue, open each project file and add the following properties at the end of the first
<PropertyGroup> element.
Then, remove the
AppxBundle MSBuild argument from the build step.
Related topicsComments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |