Skip to content

ALOps NuGet Download

Download BC Apps from NuGet feeds (v2 and v3). Auto-detects feed protocol. No nuget.exe required.

Property Value
Task name (Azure DevOps) ALOpsNuGetDownload@3
Action name (GitHub) alops-nugetdownload
Version 3.0.0
Category Utility
OS requirement Both
Preview yes

Download Business Central extension packages (.app) from NuGet feeds. Supports NuGet protocol v2 (OData/XML) and v3 (JSON/REST) with automatic detection. Resolves transitive dependencies. Publishes a resolved.json artifact listing all downloaded packages.

Inputs

authentication

Name Type Required Default Platform Description
nuget_username Text no (empty) Both Username for the NuGet source. For Azure DevOps feeds, use any value (e.g. 'az') combined with a PAT as password.
nuget_password Secret no (empty) Both Password or Personal Access Token (PAT) for the NuGet source.
nuget_source_apikey Secret no (empty) Both API Key for the NuGet source. When set, used as Bearer token and X-NuGet-ApiKey header.

source

Name Type Required Default Platform Description
nuget_protocol_version PickList no auto Both NuGet protocol version to use. 'auto' detects based on feed URL and service index. Options: auto, v2, v3.
nuget_spec_file Text yes nuget.json Both Path to the nuget.json spec file that defines feeds and package dependencies. Relative paths resolve from the workspace root.
nuget_select_type_filter Text no (empty) Both Wildcard filter for type names defined in the nuget.json spec file. Leave empty to process all types.

output

Name Type Required Default Platform Description
download_folder Text no (empty) Both Target folder where .app files will be downloaded. Defaults to a 'nuget' subfolder in the workspace.
artifact_folder_name Text yes Nuget Both Artifact folder name used when uploading the resolved.json as a build artifact.

dependencies

Name Type Required Default Platform Description
dependency_publisher_filter Text no (empty) Both Semicolon-separated list of publisher names to include when resolving dependencies. Leave empty to allow all publishers. Set to 'NONE' to skip dependency resolution entirely.
skip_microsoft_apps Boolean no true Both Skip packages whose ID starts with 'microsoft.' during dependency resolution.

Outputs

Name Description
nuget_resolved_json Path to the resolved.json file listing all downloaded packages.

Usage

- task: ALOpsNuGetDownload@3
  displayName: 'ALOps NuGet Download'
  inputs:
    nuget_username:                       # Username for the NuGet source. For Azure DevOps feeds, use any value (e.g. 'az') combined with a PAT as password. $(nuget_username)
    nuget_password:                       # Password or Personal Access Token (PAT) for the NuGet source. $(nuget_password)
    nuget_source_apikey:                  # API Key for the NuGet source. When set, used as Bearer token and X-NuGet-ApiKey header. $(nuget_source_apikey)
    nuget_protocol_version: auto          # NuGet protocol version to use. 'auto' detects based on feed URL and service index. $(nuget_protocol_version)
    nuget_spec_file: nuget.json           # Path to the nuget.json spec file that defines feeds and package dependencies. Relative paths resolve from the workspace root. $(nuget_spec_file)
    nuget_select_type_filter:             # Wildcard filter for type names defined in the nuget.json spec file. Leave empty to process all types. $(nuget_select_type_filter)
    download_folder:                      # Target folder where .app files will be downloaded. Defaults to a 'nuget' subfolder in the workspace. $(download_folder)
    artifact_folder_name: Nuget           # Artifact folder name used when uploading the resolved.json as a build artifact. $(artifact_folder_name)
    dependency_publisher_filter:          # Semicolon-separated list of publisher names to include when resolving dependencies. Leave empty to allow all publishers. Set to 'NONE' to skip dependency resolution entirely. $(dependency_publisher_filter)
    skip_microsoft_apps: True             # Skip packages whose ID starts with 'microsoft.' during dependency resolution. $(skip_microsoft_apps)
- name: ALOps NuGet Download
  uses: HodorNV/ALOps-V3/alops-nugetdownload@v3   <!-- TODO: confirm action repo path -->
  with:
    nuget_username: ''
    nuget_password: ''
    nuget_source_apikey: ''
    nuget_protocol_version: 'auto'
    nuget_spec_file: 'nuget.json'
    nuget_select_type_filter: ''
    download_folder: ''
    artifact_folder_name: 'Nuget'
    dependency_publisher_filter: ''
    skip_microsoft_apps: 'true'