带有空格和其他字符的 Wix 变量名称格式 [英] Wix variable name formats with spaces and other characters

查看:25
本文介绍了带有空格和其他字符的 Wix 变量名称格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将一个项目包含在我的 WIX Bootstrapper 中.

I have a project I am trying to include in my WIX Bootstrapper.

项目名称是Project-1 With Spaces"

The projects name is "Project-1 With Spaces"

在我的 WIX Bootstrapper 中,我试图像这样访问这个项目

In my WIX Bootstrapper i am trying to access this project like so

$(var.Project-1_With_Spaces.TargetDir)

这会引发错误

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.

重命名项目是不可能的,我认为 WIX 变量命名约定不应该强迫我无论如何都必须重命名它.

Renaming the project is not possible and I don't think WIX variable naming conventions should force me to have to rename it anyway.

推荐答案

WIX变量可以有空格,试试用

WIX variables can have spaces in, try using

$(var.Project-1 With Spaces.TargetDir)

这篇关于带有空格和其他字符的 Wix 变量名称格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆