Nested and Referenced Variables

References use #{Variable.Name} syntax and can chain through several layers without copy-paste.

Search guides... Ctrl K

Variables can reference other variables. The syntax is #{Variable.Name}. References resolve recursively at deployment time, so a chain of references collapses into a single final value before the step runs.

// Composition example

Three variables, one resolved value

Reduces the duplication in connection strings and URLs.

Db.Host       = "prd-sql-#{Region}.internal"
Db.Name       = "app_#{Environment}"
Db.Connection = "Server=#{Db.Host};Database=#{Db.Name};Trusted_Connection=yes"

Region            (env=Production)     = "eu-west"
Environment       (env=Production)     = "prd"

Resolved value of Db.Connection in Production (eu-west):
  Server=prd-sql-eu-west.internal;Database=app_prd;Trusted_Connection=yes

Why this matters

Without composition, every connection string in every environment is its own variable, and changing the database server name requires editing N values. With composition, Db.Host is one variable scoped per environment, and the rest follows.

Token replacement in files

The same #{Variable.Name} syntax works inside config files. A package deployment step with substitute variables in files enabled walks the listed files and replaces tokens before the package is placed on the target. Useful for appsettings.json, web.config, custom INI files, and similar.