Wix 事件日志未创建
我正在尝试使用 Wix 在安装时创建事件日志和事件源。安装不会失败或给出任何错误...但我没有看到任何名为 MyApp 的事件日志被创建。
<PropertyRef Id="NETFRAMEWORK40FULLINSTALLROOTDIR"/>
<Component Id="EventLog" Guid="AD09F8B9-80A0-46E6-9E36-9618E2023D67">
<util:EventSource Log="MyApp" Name="MyApp" EventMessageFile="[NETFRAMEWORK40FULLINSTALLROOTDIR]EventLogMessages.dll" />
</Component>
我以前有一个 .NET Installer 类可以执行此操作,并且运行没有问题。
我做错了什么?
I'm trying to create an Event Log and Event Source at install time using Wix. The install doesn't fail or give any error...but I don't see any Event Log called MyApp getting created.
<PropertyRef Id="NETFRAMEWORK40FULLINSTALLROOTDIR"/>
<Component Id="EventLog" Guid="AD09F8B9-80A0-46E6-9E36-9618E2023D67">
<util:EventSource Log="MyApp" Name="MyApp" EventMessageFile="[NETFRAMEWORK40FULLINSTALLROOTDIR]EventLogMessages.dll" />
</Component>
I previously had a .NET Installer class that did this and it worked without a problem.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了问题,这是因为我缺少
元素;我的代码最终看起来像这样:(因此它可以处理 .NET 4 的 32 位和 64 位安装)
I had problems with this, and it was because I was missing a
<CreateFolder />
element; my code ended up looking like this:(so it can handle both 32-bit and 64-bit installs of .NET 4)
您可以发布安装程序日志吗? EventSource 元素实际上只是一些语法糖。 WiX 将这些转换为简单的注册表项/值,并且我在使用它的任何安装中从未见过它失败。
Can you post an installer log? The EventSource element is really just some syntatical sugar. WiX translates these into simple registry keys/values and I've never seen it fail in any of the installs I've used it in.