问题
I have a project I am trying to include in my WIX Bootstrapper.
The projects name is "Project-1 With Spaces"
In my WIX Bootstrapper i am trying to access this project like so
$(var.Project-1_With_Spaces.TargetDir)
This throws an error
Undefined preprocessor variable '$(var.Project-1_With_Spaces.TargetDir)'
I believe it is the '-' character that is to blame, yet do not know how to format my variable correctly to be able to access this project. I have tried replacing '-' with underscores or removing it altogether with no luck.
Renaming the project is not possible and I don't think WIX variable naming conventions should force me to have to rename it anyway.
回答1:
WIX variables can have spaces in, try using
$(var.Project-1 With Spaces.TargetDir)
来源:https://stackoverflow.com/questions/19561668/wix-variable-name-formats-with-spaces-and-other-characters