财产价值被破坏
我像这样传递属性值:
property1=value1;property2=value2
但有时值包含“;”符号,这会导致 WiX 错误地反序列化属性字符串。我尝试过用双引号引用值
property1="value1";property2="value2"
,但这没有帮助。那么我该如何处理这个问题呢?
I pass property values like this:
property1=value1;property2=value2
but sometimes values contain ';' symbols, which causes WiX to deserialize the property string incorrectly. I've tried enquoting values with double quotes
property1="value1";property2="value2"
but that didn't help. So how can I deal with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想我们前几天刚刚看到这个问题(简短的答案是用 ;; 转义它)
对于更详细的讨论,如果您想了解如何使用 Type 51 自定义操作来设置要由 DTF 自定义操作反序列化的属性,编写一个像这样的小控制台应用程序
结果将是:
这应该可以帮助您了解如何格式化每个可能的场景。然而,最终您可能会发现自己处于 51 型 CA 不够的情况。在这种情况下,您需要编写一个立即 CA 来构建您的 CustomActionData 集合,然后使用 Session.DoAction 方法来安排您的延迟 CA 将 CustomActionData 传递给它。
I thought we just saw this question the other day ( short answer is escape it with ;; )
For a more detailed discussion, if you want to understand how to use Type 51 custom actions to set properties to be deserialized by a DTF custom action, write a little console app like this
The result will be:
This should help you know how to format every scenario possible. However, eventually you might findyourself in a situation where a Type 51 CA isn't enough. In that case you'd write an immeadiate CA to build up your CustomActionData collection and then use the Session.DoAction method to schedule your deferred CA passing the CustomActionData through to it.
在评论中回复请求。要在属性值中使用双分号,您可以使用 JScript CA:
Replying to request in comments. To double semi-colons in a property value, you can use JScript CA: