Wil
Wil

Reputation: 13

How do you reference a ProjectName with a . in the name with WIX

I'm trying to add a file source using the project. But my project name has . in it:

<Component Guid="*">
  <File Source="$(var.Company.Product.Service.TargetPath" KeyPath="yes" />
</Component>

I get this error when trying to build:

Error 1 Ill-formed preprocessor variable '$((var.Company.Product.Service.TargetPath)'. Variables must have a prefix (like 'var.', 'env.', or 'sys.') and a name at least 1 character long. If the literal string '$((var.Company.Product.Service.TargetPath)' is desired, use '$$((var.Company.Product.Service.TargetPath)'.

Upvotes: 1

Views: 587

Answers (1)

Stein &#197;smul
Stein &#197;smul

Reputation: 42206

You probably just lack end parenthesis:

<File Source="$(var.Company.Product.Service.TargetPath)" KeyPath="yes" />

See here for Wix tips and tricks: WiX tricks and tips

Upvotes: 2

Related Questions