Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
TFS 2017 | TFS 2015
Use this task to build an Android app with Xamarin.
Demands
AndroidSDK, MSBuild, Xamarin.Android
Arguments
| Argument | Description | 
|---|---|
| projectProject | (Required) Relative path from repo root of Xamarin.Android project(s) to build.  Wildcards can be used more information. For example, **/*.csprojfor all csproj files in all subfolders. The project must have a PackageForAndroid target ifCreate App Packageis selected.Default value: **/*.csproj Argument aliases: projectFile | 
| targetTarget | (Optional) Build these targets in this project. Use a semicolon to separate multiple targets. | 
| outputDirOutput Directory | Optionally provide the output directory for the build. Example: $(build.binariesDirectory)/bin/Release Argument aliases: outputDirectory | 
| configurationConfiguration | (Optional) Specify the configuration you want to build such as  Tip: Declare a build variable such as  | 
| createAppPackageCreate app package | (Optional) Passes the target (/t:PackageForAndroid) during build to generate an APK. Default value: true | 
| cleanClean | (Optional) Passes the clean target (/t:clean) during build Default value: false | 
MSBuild options
| Argument | Description | 
|---|---|
| msbuildLocationMethodMSBuild | (Optional) Path to MSBuild (on Windows) or xbuild (on macOS).  Default behavior is to search for the latest version. Default value: version Argument aliases: msbuildLocationOption | 
| msbuildVersionMSBuild version | (Optional) If the preferred version cannot be found, the latest version found will be used instead. On macOS, xbuild (Mono) or MSBuild (Visual Studio for Mac) will be used. Default value: 15.0 Argument aliases: msbuildVersionOption | 
| msbuildLocationMSBuild location | (Required) Optionally supply the path to MSBuild (on Windows) or xbuild (on macOS) Default value: version Argument aliases: msbuildFile | 
| msbuildArchitectureMSBuild architecture | Optionally supply the architecture (x86, x64) of MSBuild to run Default value: x86 Argument aliases: msbuildArchitectureOption | 
| msbuildArgumentsAdditional Arguments | (Optional) Additional arguments passed to MSBuild (on Windows) or xbuild (on macOS). | 
JDK options
| Argument | Description | 
|---|---|
| jdkSelectionSelect JDK to use for the build | (Required) Pick the JDK to be used during the build by selecting a JDK version that will be discovered during builds or by manually entering a JDK path. 
 Default value: JDKVersion Argument aliases: jdkOption | 
| jdkVersionJDK version | (Optional) Use the selected JDK version during build. Default value: default Argument aliases: jdkVersionOption | 
| jdkUserInputPathJDK path | (Required) Use the selected JDK version during build. Default value: default Argument aliases: jdkDirectory | 
| jdkArchitectureJDK Architecture | Optionally supply the architecture (x86, x64) of JDK Default value: x64 Argument aliases: jdkArchitectureOption | 
Task control options
Example
Open source
This task is open source on GitHub. Feedback and contributions are welcome.
FAQ
Do I need an agent?
You need at least one agent to run your build or release.
I'm having problems. How can I troubleshoot them?
See Troubleshoot Build and Release.
I can't select a default agent pool and I can't queue my build or release. How do I fix this?
See Agent pools.
My NuGet push task is failing with the following error: "Error: unable to get local issuer certificate". How can I fix this?
This can be fixed by adding a trusted root certificate. You can either add the NODE_EXTRA_CA_CERTS=file environment variable to your build agent, or you can add the NODE.EXTRA.CA.CERTS=file task variable in your pipeline. See Node.js documentation for more details about this variable. See Set variables in a pipeline for instructions on setting a variable in your pipeline.
I use TFS on-premises and I don't see some of these features. Why not?
Some of these features are available only on Azure Pipelines and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.