Skip to content

ALOps App Compiler

Compile AL Extension(s) for Business Central using altool.exe from the NuGet package.

Property Value
Task name (Azure DevOps) ALOpsAppCompiler@3
Action name (GitHub) alops-appcompiler
Version 3.476.10779
Category Utility
OS requirement Both
Preview yes

Compile Business Central extension(s) from AL code using altool.exe (microsoft.dynamics.businesscentral.development.tools NuGet package). Supports serial and parallel compilation modes.

Inputs

altool

Name Type Required Default Platform Description
altool_package_version Text yes 17.0.30.49729-beta Both Version of the microsoft.dynamics.businesscentral.development.tools NuGet package. Pin to a specific version for reproducible builds.

compilation

Name Type Required Default Platform Description
compilation_mode PickList yes Serial Both Serial: compiles one app at a time. Parallel: uses workspace compile for concurrency. Options: Serial, Parallel.
alsourcepath Text no (empty) Both Root folder searched recursively for app.json files.
alcachepath Text no (empty) Both Folder containing symbol .app files. Defaults to alsourcepath when empty.
maxcpucount Text no (empty) Both Maximum concurrent compilations in parallel mode. Defaults to logical processor count.
alc_continue_build_on_error Boolean no false Both Pass --continueBuildOnError to alc. Keeps compiling remaining files when a single file errors.
additional_probing_paths Text no (empty) Both Extra symbol probing paths passed to alc. Comma-separated.
generate_report_layouts Boolean no true Both Generate report layout files during compilation.

versioning

Name Type Required Default Platform Description
appversiontemplate Text no 1.0.*.0 Both Four-part version template. * = build number, ? = keep original, A = application field.
updatebuildnumber Boolean no true Both Update the CI build number with the compiled app version.
appfilenametemplate Text no (empty) Both Template for the output .app filename. Tokens: %APPNAME%, %PUBLISHER%, %VERSION%.

analysis

Name Type Required Default Platform Description
alcodeanalyzer Text no (empty) Both Comma-separated list of code analyzer DLL paths.
ruleset Text no (empty) Both Path to a .ruleset.json file for code analysis.
failonwarnings Boolean no false Both Treat compiler warnings as errors.
fail_on_any Boolean no false Both Fail the task on any compiler diagnostic (error or warning). Stricter than failonwarnings.
ignore_pragma Boolean no false Both Silently skip diagnostics suppressed via #pragma warning disable in source.
enable_external_rulesets Boolean no true Both Allow rulesets to import other rulesets via include/exclude paths.

symbols

Name Type Required Default Platform Description
auto_resolve_ms_symbols Boolean no true Both Download missing MS symbols from the MSSymbols NuGet feed.
force_download_mssymbols Boolean no false Both Delete all Microsoft_*.app files from the symbol cache before resolving. Use in multi-localisation pipelines where the same cache path is reused across countries.
bc_localization Text no W1 Both Business Central country code for MS symbol resolution.
bc_version Text no (empty) Both BC version filter in Major.Minor format. Auto-detected from app.json when empty.
ms_symbols_feed Text no https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json Both NuGet v3 service index URL for the MSSymbols feed.
ms_symbols_pat Secret no (empty) Both PAT for authenticated MSSymbols feed access.
accept_insider_eula Boolean no false Both Accept the Microsoft BC insider EULA for NextMajor/NextMinor.
auto_resolve_appsource_symbols Boolean no true Both Resolve missing ISV symbol dependencies from the AppSourceSymbols feed.
appsource_symbols_feed Text no https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/AppSourceSymbols/nuget/v3/index.json Both NuGet v3 service index URL for the AppSourceSymbols feed.
appsource_symbols_pat Secret no (empty) Both PAT for authenticated AppSourceSymbols feed access.

diagnostics

Name Type Required Default Platform Description
printappmanifest Boolean no true Both Print the app.json contents to the log before compilation.
outputalclogs Boolean no false Both Output detailed ALC compiler logs.
alc_error_log Boolean no false Both Emit per-app <AppName>_ALCErrorLog.txt next to the compiled .app.

publishing

Name Type Required Default Platform Description
publishartifact Boolean no true (alt: true) Azure DevOps only Publish the compiled .app as a build artifact.
outputpath Text no (empty) Both Folder where compiled .app files are written. When empty, defaults to the CI platform artifact directory.
track_source_build_metadata Boolean no true Both Inject build and source metadata into app.json. Requires runtime >= 12.0.

manifest

Name Type Required Default Platform Description
showmycode Text no (empty) Both Override showMyCode in app.json (true/false/empty=keep).
internalsvisibleto Text no (empty) Both Comma-separated list of app IDs to add to internalsVisibleTo.
preprocessorsymbols Text no (empty) Both Comma-separated list of preprocessor symbols for conditional compilation.
updateruntime Text no (empty) Both Override the runtime field in app.json (e.g. "15.0"). Pass LATEST to auto-resolve via altool GetLatestSupportedRuntimeVersion (requires bc_version to be set). Empty = keep.
rep_allowdebugging Text no (empty) Both Override resourceExposurePolicy.allowDebugging in app.json. Values: Enable / Disable / empty=keep. Mutually exclusive with showMyCode (REP wins on runtime >= 8).
rep_allowdownloadingsource Text no (empty) Both Override resourceExposurePolicy.allowDownloadingSource in app.json. Values: Enable / Disable / empty=keep.
rep_includesourceinsymbol Text no (empty) Both Override resourceExposurePolicy.includeSourceInSymbolFile in app.json. Values: Enable / Disable / empty=keep.
applicationinsightskey Text no (empty) Both Application Insights Instrumentation Key (GUID) or full Connection String to write to app.json. Pass NONE to remove. Empty = keep.
suppresswarnings Text no (empty) Both Comma-separated list of warning codes to write to suppressWarnings in app.json (e.g. AL0432,AL0606). Pass NONE or DISABLED to remove. Empty = keep.
allowed_publisher_names Text no (empty) Both Whitelist of allowed app publishers. The task fails for any project whose publisher is not on this list. Empty = no enforcement.
allowed_publisher_separator Text no , Both Separator used to split allowed_publisher_names.

Outputs

Name Description
artifact_path Path to the last compiled .app file.
artifact_paths Comma-separated list of all compiled .app file paths.
build_version The computed app version (when updatebuildnumber is true).

Usage

- task: ALOpsAppCompiler@3
  displayName: 'ALOps App Compiler'
  inputs:
    altool_package_version: 17.0.30.49729-beta                                                                                                # Version of the microsoft.dynamics.businesscentral.development.tools NuGet package. Pin to a specific version for reproducible builds. $(altool_package_version)
    compilation_mode: Serial                                                                                                                  # Serial: compiles one app at a time. Parallel: uses workspace compile for concurrency. $(compilation_mode)
    alsourcepath:                                                                                                                             # Root folder searched recursively for app.json files. $(alsourcepath)
    alcachepath:                                                                                                                              # Folder containing symbol .app files. Defaults to alsourcepath when empty. $(alcachepath)
    maxcpucount:                                                                                                                              # Maximum concurrent compilations in parallel mode. Defaults to logical processor count. $(maxcpucount)
    alc_continue_build_on_error: False                                                                                                        # Pass --continueBuildOnError to alc. Keeps compiling remaining files when a single file errors. $(alc_continue_build_on_error)
    additional_probing_paths:                                                                                                                 # Extra symbol probing paths passed to alc. Comma-separated. $(additional_probing_paths)
    generate_report_layouts: True                                                                                                             # Generate report layout files during compilation. $(generate_report_layouts)
    appversiontemplate: 1.0.*.0                                                                                                               # Four-part version template. * = build number, ? = keep original, A = application field. $(appversiontemplate)
    updatebuildnumber: True                                                                                                                   # Update the CI build number with the compiled app version. $(updatebuildnumber)
    appfilenametemplate:                                                                                                                      # Template for the output .app filename. Tokens: %APPNAME%, %PUBLISHER%, %VERSION%. $(appfilenametemplate)
    alcodeanalyzer:                                                                                                                           # Comma-separated list of code analyzer DLL paths. $(alcodeanalyzer)
    ruleset:                                                                                                                                  # Path to a .ruleset.json file for code analysis. $(ruleset)
    failonwarnings: False                                                                                                                     # Treat compiler warnings as errors. $(failonwarnings)
    fail_on_any: False                                                                                                                        # Fail the task on any compiler diagnostic (error or warning). Stricter than failonwarnings. $(fail_on_any)
    ignore_pragma: False                                                                                                                      # Silently skip diagnostics suppressed via `#pragma warning disable` in source. $(ignore_pragma)
    enable_external_rulesets: True                                                                                                            # Allow rulesets to import other rulesets via include/exclude paths. $(enable_external_rulesets)
    auto_resolve_ms_symbols: True                                                                                                             # Download missing MS symbols from the MSSymbols NuGet feed. $(auto_resolve_ms_symbols)
    force_download_mssymbols: False                                                                                                           # Delete all `Microsoft_*.app` files from the symbol cache before resolving. Use in multi-localisation pipelines where the same cache path is reused across countries. $(force_download_mssymbols)
    bc_localization: W1                                                                                                                       # Business Central country code for MS symbol resolution. $(bc_localization)
    bc_version:                                                                                                                               # BC version filter in Major.Minor format. Auto-detected from app.json when empty. $(bc_version)
    ms_symbols_feed: https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json                # NuGet v3 service index URL for the MSSymbols feed. $(ms_symbols_feed)
    ms_symbols_pat:                                                                                                                           # PAT for authenticated MSSymbols feed access. $(ms_symbols_pat)
    accept_insider_eula: False                                                                                                                # Accept the Microsoft BC insider EULA for NextMajor/NextMinor. $(accept_insider_eula)
    auto_resolve_appsource_symbols: True                                                                                                      # Resolve missing ISV symbol dependencies from the AppSourceSymbols feed. $(auto_resolve_appsource_symbols)
    appsource_symbols_feed: https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/AppSourceSymbols/nuget/v3/index.json  # NuGet v3 service index URL for the AppSourceSymbols feed. $(appsource_symbols_feed)
    appsource_symbols_pat:                                                                                                                    # PAT for authenticated AppSourceSymbols feed access. $(appsource_symbols_pat)
    printappmanifest: True                                                                                                                    # Print the app.json contents to the log before compilation. $(printappmanifest)
    outputalclogs: False                                                                                                                      # Output detailed ALC compiler logs. $(outputalclogs)
    alc_error_log: False                                                                                                                      # Emit per-app `<AppName>_ALCErrorLog.txt` next to the compiled .app. $(alc_error_log)
    publishartifact: True                                                                                                                     # Publish the compiled .app as a build artifact. $(publishartifact)
    outputpath:                                                                                                                               # Folder where compiled .app files are written. When empty, defaults to the CI platform artifact directory. $(outputpath)
    track_source_build_metadata: True                                                                                                         # Inject build and source metadata into app.json. Requires runtime >= 12.0. $(track_source_build_metadata)
    showmycode:                                                                                                                               # Override showMyCode in app.json (true/false/empty=keep). $(showmycode)
    internalsvisibleto:                                                                                                                       # Comma-separated list of app IDs to add to internalsVisibleTo. $(internalsvisibleto)
    preprocessorsymbols:                                                                                                                      # Comma-separated list of preprocessor symbols for conditional compilation. $(preprocessorsymbols)
    updateruntime:                                                                                                                            # Override the runtime field in app.json (e.g. "15.0"). Pass LATEST to auto-resolve via altool GetLatestSupportedRuntimeVersion (requires bc_version to be set). Empty = keep. $(updateruntime)
    rep_allowdebugging:                                                                                                                       # Override resourceExposurePolicy.allowDebugging in app.json. Values: Enable / Disable / empty=keep. Mutually exclusive with showMyCode (REP wins on runtime >= 8). $(rep_allowdebugging)
    rep_allowdownloadingsource:                                                                                                               # Override resourceExposurePolicy.allowDownloadingSource in app.json. Values: Enable / Disable / empty=keep. $(rep_allowdownloadingsource)
    rep_includesourceinsymbol:                                                                                                                # Override resourceExposurePolicy.includeSourceInSymbolFile in app.json. Values: Enable / Disable / empty=keep. $(rep_includesourceinsymbol)
    applicationinsightskey:                                                                                                                   # Application Insights Instrumentation Key (GUID) or full Connection String to write to app.json. Pass NONE to remove. Empty = keep. $(applicationinsightskey)
    suppresswarnings:                                                                                                                         # Comma-separated list of warning codes to write to suppressWarnings in app.json (e.g. AL0432,AL0606). Pass NONE or DISABLED to remove. Empty = keep. $(suppresswarnings)
    allowed_publisher_names:                                                                                                                  # Whitelist of allowed app publishers. The task fails for any project whose publisher is not on this list. Empty = no enforcement. $(allowed_publisher_names)
    allowed_publisher_separator: ,                                                                                                            # Separator used to split `allowed_publisher_names`. $(allowed_publisher_separator)
- name: ALOps App Compiler
  uses: HodorNV/ALOps-V3/alops-appcompiler@v3   <!-- TODO: confirm action repo path -->
  with:
    altool_package_version: '17.0.30.49729-beta'
    compilation_mode: 'Serial'
    alsourcepath: ''
    alcachepath: ''
    maxcpucount: ''
    alc_continue_build_on_error: 'false'
    additional_probing_paths: ''
    generate_report_layouts: 'true'
    appversiontemplate: '1.0.*.0'
    updatebuildnumber: 'true'
    appfilenametemplate: ''
    alcodeanalyzer: ''
    ruleset: ''
    failonwarnings: 'false'
    fail_on_any: 'false'
    ignore_pragma: 'false'
    enable_external_rulesets: 'true'
    auto_resolve_ms_symbols: 'true'
    force_download_mssymbols: 'false'
    bc_localization: 'W1'
    bc_version: ''
    ms_symbols_feed: 'https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json'
    ms_symbols_pat: ''
    accept_insider_eula: 'false'
    auto_resolve_appsource_symbols: 'true'
    appsource_symbols_feed: 'https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/AppSourceSymbols/nuget/v3/index.json'
    appsource_symbols_pat: ''
    printappmanifest: 'true'
    outputalclogs: 'false'
    alc_error_log: 'false'
    outputpath: ''
    track_source_build_metadata: 'true'
    showmycode: ''
    internalsvisibleto: ''
    preprocessorsymbols: ''
    updateruntime: ''
    rep_allowdebugging: ''
    rep_allowdownloadingsource: ''
    rep_includesourceinsymbol: ''
    applicationinsightskey: ''
    suppresswarnings: ''
    allowed_publisher_names: ''
    allowed_publisher_separator: ','