从 WIx 中的属性指定性能类别名称
我试图创建一个性能类别作为 WIX 安装的一部分,但尝试将属性传递给类别名称只会导致性能类别按字面意思采用名称。
<util:PerformanceCategory Id="PerformanceCounter" Name="[PERFORMANCE_CATEGORY_NAME]" DefaultLanguage="english">
是否有可能从属性中获取名称?
I'm trying to create a performance category as part of the WIX installation but trying to pass in a property to the category's name just results in the performance category taking the name literally.
<util:PerformanceCategory Id="PerformanceCounter" Name="[PERFORMANCE_CATEGORY_NAME]" DefaultLanguage="english">
Is it possible for it to get the name from a property?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据WiX工具集的来源,PerformanceCategory MSI表的Name列值是使用WcaGetRecordString函数读取的,该函数不考虑格式化值并传递@Name属性中写入的值。我不知道这是一个意图还是只是一个简单的疏忽,但如果有一天它出于相同的目的使用 WcaGetRecordFormattedString,它会按照您现在期望的方式工作。
According to the sources of the WiX toolset, the Name column value of PerformanceCategory MSI table is read using WcaGetRecordString function, which doesn't consider formatted values and passes the value as it is written in @Name attribute. I don't know whether it was an intention or just a simple oversight, but if it uses WcaGetRecordFormattedString for the same purpose one day, it will work the way you expect it to now.
PERFORMANCE_CATEGORY_NAME 变量必须在 Product.wxs(主 wix 文件)文件中定义。一旦定义好,你就可以获得变量的值
PERFORMANCE_CATEGORY_NAME variable must be defined in Product.wxs(main wix file) file. Once it is defined then you can have the value of the variable