Utility: Update Service Fabric App Versions

VSTS | TFS 2018 | TFS 2017

Automatically updates the versions of a packaged Service Fabric application.

This task appends a version suffix to all service and application versions, specified in the manifest files, in an Azure Service Fabric application package.




Argument Description
Application Package

The location of the Service Fabric application package to be deployed to the cluster.

  • Example: $(system.defaultworkingdirectory)/**/drop/applicationpackage
  • Can include wildcards and variables.
Version Value

The value appended to the versions in the manifest files. Default is .$(Build.BuildNumber).

Tip: You can modify the build number format directly or use a logging command to dynamically set a variable in any format. For example, you can use $(VersionSuffix) defined in a PowerShell task:

$versionSuffix = ".$([DateTimeOffset]::UtcNow.ToString('yyyyMMdd.HHmmss'))"

Write-Host "##vso[task.setvariable variable=VersionSuffix;]$versionSuffix"

Version Behavior

Specify whether to append the version value to existing values in the manifest files, or replace them.

Update only if changed

Select this check box if you want to append the new version suffix to only the packages that have changed from a previous build. If no changes are found, the version suffix from the previous build will be appended.

Note: By default, the compiler will create different outputs even if you made no changes. Use the deterministic compiler flag to ensure builds with the same inputs produce the same outputs.

Package Artifact Name

The name of the artifact containing the application package from the previous build.

Log all changes

Select this check box to compare all files in every package and log if the file was added, removed, or if its content changed. Otherwise, compare files in a package only until the first change is found for potentially faster performance.

Compare against

Specify whether to compare against the last completed, successful build or against a specific build.

Build Number

If comparing against a specific build, the build number to use.

Control options

Also see: Service Fabric Application Deployment task

YAML snippet


- task: ServiceFabricUpdateManifests@2
#   updateType: Manifest versions # Manifest versions (default), Docker image settings
#   versionSuffix: .$(Build.BuildNumber)
#   versionBehavior: Append # Append (default), Replace
#   updateOnlyChanged: false
#   logAllChanges: true
#   compareType: LastSuccessful # LastSuccessful (default), Specific
#   overwriteExistingPkgArtifact: true


Do I need an agent?

You need at least one agent to run your build or release. Get an agent.

I can't select a default agent queue and I can't queue my build or release. How do I fix this?

See Agent pools and queues.

I use TFS on-premises and I don't see some of these features. Why not?

Some of these features are available only on VSTS and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.