Skip to content
Dan Siegel edited this page Jul 26, 2018 · 2 revisions

The Mobile.BuildTools are a collection of MSBuild Tasks that help make MSBuild smarter in handling the build process for CI/CD with Mobile Applications. The library was born from a desire to share build processes from one app to the next without having to copy and paste a bunch of build scripts each of which could easily end up out of date. Because the Mobile.BuildTools simply provides MSBuild Tasks, this adds nothing to the size of your application and if being used on a project that will be packed and shared, you can set the PackageReference's PrivateAssets to all.

Getting Started

To get started install the Mobile.BuildTools package from NuGet. Many of the features included in the Mobile.BuildTools just simply work. For instance if you have the Mobile.BuildTools installed and have any SASS files it will automatically compile and generate the css to embed in your project. Other features like App Versioning work out of the box, however they require that you Opt-In at a project level.

Be sure to pay attention to the various properties listed throughout the docs as these allow you to customize your experience. For instance you can change the generated Secrets class to be called anything you want.

Build Props

The build tasks rely on a number of build properties. These all have default values to better assist you. However in the event that you require some customization there are two ways of setting these properties. The first as you would imagine is at the project level. This entails editing the csproj for your specific project and adding some element and value in the PropertyGroup of the project. In order to set a value at a Solution level, add a file named Directory.build.props next to the solution. This will help to ensure that any properties you have set will apply to all projects within the solution.

Samples

  • AppCenter.DemoApp - Sample Xamarin Forms app that protects the Info.plist & AndroidManifest.xml, injects the AppCenter App Secrets, and automatically increments the app version on each build using timestamps locally and the Build Id when on built AppCenter.
Clone this wiki locally