XamarinAndroid@1 - Xamarin.Android v1 task

XamarinAndroid@1 is deprecated. Originally, this task was used to build an Android app with Xamarin.

Note

This task is deprecated and was retired May 1, 2024.

XamarinAndroid@1 is deprecated. Originally, this task was used to build an Android app with Xamarin.

Note

This task is deprecated and was retired May 1, 2024.

Syntax

# Xamarin.Android v1
# Build an Android app with Xamarin.
- task: XamarinAndroid@1
  inputs:
    projectFile: '**/*.csproj' # string. Alias: project. Required. Project. Default: **/*.csproj.
    #target: # string. Target. 
    #outputDirectory: # string. Alias: outputDir. Output directory. 
    #configuration: # string. Configuration. 
    #createAppPackage: true # boolean. Create app package. Default: true.
    #clean: false # boolean. Clean. Default: false.
  # MSBuild Options
    #msbuildLocationOption: 'version' # 'version' | 'location'. Alias: msbuildLocationMethod. MSBuild. Default: version.
    #msbuildVersionOption: '15.0' # 'latest' | '17.0' | '16.0' | '15.0' | '14.0' | '12.0' | '4.0'. Alias: msbuildVersion. Optional. Use when msbuildLocationMethod = version. MSBuild version. Default: 15.0.
    #msbuildFile: # string. Alias: msbuildLocation. Required when msbuildLocationMethod = location. MSBuild location. 
    #msbuildArchitectureOption: 'x86' # 'x86' | 'x64'. Alias: msbuildArchitecture. Optional. Use when msbuildLocationMethod = version. MSBuild architecture. Default: x86.
    #msbuildArguments: # string. Additional arguments. 
  # JDK Options
    jdkOption: 'JDKVersion' # 'JDKVersion' | 'Path'. Alias: jdkSelection. Required. Select JDK to use for the build. Default: JDKVersion.
    #jdkVersionOption: 'default' # 'default' | '1.11' | '1.10' | '1.9' | '1.8' | '1.7' | '1.6'. Alias: jdkVersion. Optional. Use when jdkSelection = JDKVersion. JDK version. Default: default.
    #jdkDirectory: # string. Alias: jdkUserInputPath. Required when jdkSelection = Path. JDK path. 
    #jdkArchitectureOption: 'x64' # 'x86' | 'x64'. Alias: jdkArchitecture. Optional. Use when jdkVersion != default. JDK architecture. Default: x64.
# Xamarin.Android v1
# Build an Android app with Xamarin.
- task: XamarinAndroid@1
  inputs:
    projectFile: '**/*.csproj' # string. Alias: project. Required. Project. Default: **/*.csproj.
    #target: # string. Target. 
    #outputDirectory: # string. Alias: outputDir. Output directory. 
    #configuration: # string. Configuration. 
    #createAppPackage: true # boolean. Create app package. Default: true.
    #clean: false # boolean. Clean. Default: false.
  # MSBuild Options
    #msbuildLocationOption: 'version' # 'version' | 'location'. Alias: msbuildLocationMethod. MSBuild. Default: version.
    #msbuildVersionOption: '15.0' # 'latest' | '15.0' | '14.0' | '12.0' | '4.0'. Alias: msbuildVersion. Optional. Use when msbuildLocationMethod = version. MSBuild version. Default: 15.0.
    #msbuildFile: # string. Alias: msbuildLocation. Required when msbuildLocationMethod = location. MSBuild location. 
    #msbuildArchitectureOption: 'x86' # 'x86' | 'x64'. Alias: msbuildArchitecture. Optional. Use when msbuildLocationMethod = version. MSBuild architecture. Default: x86.
    #msbuildArguments: # string. Additional arguments. 
  # JDK Options
    jdkOption: 'JDKVersion' # 'JDKVersion' | 'Path'. Alias: jdkSelection. Required. Select JDK to use for the build. Default: JDKVersion.
    #jdkVersionOption: 'default' # 'default' | '1.11' | '1.10' | '1.9' | '1.8' | '1.7' | '1.6'. Alias: jdkVersion. Optional. Use when jdkSelection = JDKVersion. JDK version. Default: default.
    #jdkDirectory: # string. Alias: jdkUserInputPath. Required when jdkSelection = Path. JDK path. 
    #jdkArchitectureOption: 'x64' # 'x86' | 'x64'. Alias: jdkArchitecture. Optional. Use when jdkVersion != default. JDK architecture. Default: x64.

Inputs

projectFile - Project
Input alias: project. string. Required. Default value: **/*.csproj.

Specifies the relative path from repo root of Xamarin.Android project(s) to build. Wildcards can be used. For more information, see the File matching patterns reference. For example, **/*.csproj for all csproj files in all subfolders. The project must have a PackageForAndroid target if Create App Package is selected.


target - Target
string.

Specifies which targets to build in this project. Use a semicolon to separate multiple targets.


outputDirectory - Output directory
Input alias: outputDir. string.

Optional. Provides the output directory for the build. Example: $(build.binariesDirectory)/bin/Release.


configuration - Configuration
string.

Specifies the configuration you want to build. For example, debug or release.

Tip

Declare a build variable such as BuildConfiguration on the variables tab (selecting Allow at Queue Time) and reference it here as $(BuildConfiguration). You can then modify the platform when you queue the build and enable building multiple configurations.


createAppPackage - Create app package
boolean. Default value: true.

Passes the target, (/t:PackageForAndroid), during the build to generate an APK.


clean - Clean
boolean. Default value: false.

Passes the clean target, (/t:clean), during the build.


msbuildLocationOption - MSBuild
Input alias: msbuildLocationMethod. string. Allowed values: version, location (Specify Location). Default value: version.

Specifies the path to MSBuild (on Windows) or xbuild (on macOS). The default behavior is to search for the latest version.


msbuildVersionOption - MSBuild version
Input alias: msbuildVersion. string. Optional. Use when msbuildLocationMethod = version. Allowed values: latest, 17.0 (MSBuild 17.0), 16.0 (MSBuild 16.0), 15.0 (MSBuild 15.0), 14.0 (MSBuild 14.0), 12.0 (MSBuild 12.0), 4.0 (MSBuild 4.0). Default value: 15.0.

Specifies the use of the latest version if the preferred version cannot be found. On macOS, xbuild (Mono) or MSBuild (Visual Studio for Mac) will be used.


msbuildVersionOption - MSBuild version
Input alias: msbuildVersion. string. Optional. Use when msbuildLocationMethod = version. Allowed values: latest, 15.0 (MSBuild 15.0), 14.0 (MSBuild 14.0), 12.0 (MSBuild 12.0), 4.0 (MSBuild 4.0). Default value: 15.0.

Specifies the use of the latest version if the preferred version cannot be found. On macOS, xbuild (Mono) or MSBuild (Visual Studio for Mac) will be used.


msbuildFile - MSBuild location
Input alias: msbuildLocation. string. Required when msbuildLocationMethod = location.

Optional. Supplies the path to MSBuild (on Windows) or xbuild (on macOS).


msbuildArchitectureOption - MSBuild architecture
Input alias: msbuildArchitecture. string. Optional. Use when msbuildLocationMethod = version. Allowed values: x86 (MSBuild x86), x64 (MSBuild x64). Default value: x86.

Supplies the architecture (x86, x64) of the MSBuild you want to run.


msbuildArguments - Additional arguments
string.

Specifies additional arguments passed to MSBuild (on Windows) or xbuild (on macOS).


jdkOption - Select JDK to use for the build
Input alias: jdkSelection. string. Required. Allowed values: JDKVersion (JDK Version), Path. Default value: JDKVersion.

Specifies the JDK version that the task uses during the build process. The JDKVersion value specifies a JDK version that the task discovers during builds. The Path value specifies a file path for a JDK version.


jdkVersionOption - JDK version
Input alias: jdkVersion. string. Optional. Use when jdkSelection = JDKVersion. Allowed values: default, 1.11 (JDK 11), 1.10 (JDK 10 (out of support)), 1.9 (JDK 9 (out of support)), 1.8 (JDK 8), 1.7 (JDK 7), 1.6 (JDK 6 (out of support)). Default value: default.

Specifies the JDK version to use during the build.


jdkDirectory - JDK path
Input alias: jdkUserInputPath. string. Required when jdkSelection = Path.

Specifies the JDK version to use during the build at the jdkSelection path.


jdkArchitectureOption - JDK architecture
Input alias: jdkArchitecture. string. Optional. Use when jdkVersion != default. Allowed values: x86, x64. Default value: x64.

Supplies the architecture (x86, x64) of JDK.


Task control options

All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.

Output variables

None.

Remarks

Use this task to build an Android app with Xamarin.

Examples

Requirements

Requirement Description
Pipeline types YAML, Classic build
Runs on Agent, DeploymentGroup
Demands Self-hosted agents must have capabilities that match the following demands to run jobs that use this task: MSBuild, Xamarin.Android
Capabilities This task does not satisfy any demands for subsequent tasks in the job.
Command restrictions Any
Settable variables Any
Agent version 1.83.0 or greater
Task category Build