Binder Variables

Standard Binder Variables

Some properties are not available until the linker is about to generate, or bind, the final output. These variables are called binder variables and supported binder variables are listed below.

All Versioned Files

The following standard binder variables are available for all versioned binaries.

Variable name

Example usage

Example value

bind.fileLanguage.FileID

!(bind.fileLanguage.MyFile

1033

bind.fileVersion.FileID

!(bind.fileVersion.MyFile)

1.0.0.0

Assemblies

The following standard binder variables are available for all managed and native assemblies (except where noted), where the File/@Assembly attribute is set to ".net" or "win32".

Variable name

Example usage

Example value

bind.assemblyCulture.FileID
(managed only)

!(bind.assemblyCulture.MyAssembly)

neutral

bind.assemblyFileVersion.FileID

!(bind.assemblyFileVersion.MyAssembly)

1.0.0.0

bind.assemblyFullName.FileID
(managed only)

!(bind.assemblyName.MyAssembly)

MyAssembly, version=1.0.0.0, culture=neutral, publicKeyToken=0123456789abcdef, processorArchitecture=MSIL

bind.assemblyName.FileID

!(bind.assemblyName.MyAssembly)

MyAssembly

bind.assemblyProcessorArchitecture.FileID

!(bind.assemblyProcessorArchitecture.MyAssembly)

MSIL

bind.assemblyPublicKeyToken.FileID

!(bind.assemblyPublicKeyToken.MyAssembly)

0123456789abcdef

bind.assemblyType.FileID
(native only)

!(bind.assemblyType.MyAssembly)

win32

bind.assemblyVersion.FileID

!(bind.assemblyVersion.MyAssembly)

1.0.0.0

Localization Variables

Variables can be passed in before binding the output file from a WiX localization file, or .wxl file. This process allows the developer to link one or more .wixobj files together with diferent .wxl files to produce different localized packages.

Localization variables are in the following format:

!(loc.VariableName)

Read more about localization for how to create and link .wxl files.

Custom Binder Variables

You can create your own binder variables using the WixVariable element or by simply typing your own variable name in the following format:

!(bind.VariableName)

Custom binder variables allow you to use the same .wixobj files but specify different values when linking, similar to how localization variables are used. You might use binder variables for different builds, like varying the target processor architecture.