开发者

Create EventLog source in WiX without an event message file

I've seen a few questions here and there about creating event log sources using WiX. What puzzles me is why util:EventSource/开发者_JAVA技巧@EventMessageFile is required. It's annoying having to specify it when you don't need a message file to write event log entries, and the abstraction offered by .NET's System.Diagnostics.Trace doesn't expose the ability to use one.

The standard advice seems to be to use a directory search to set the attribute to the Framework's EventLogMessages.dll, but nobody repeating this mantra ever gives any justification for it.

Short of not using the (tested, robust) custom actions supplied with WiX, is there any way to get around this requirement?

And why do authors of managed applications which don't use this aspect of the event log take such pains to (apparently) pointlessly refer to a Framework DLL rather than one of their own executables?


An event message file is required, per MSDN: http://msdn.microsoft.com/en-us/library/aa363680%28v=VS.85%29.aspx. .NET supplies one automatically -- and yes, it's EventLogMessages.dll -- when you use the Trace class (or EventLog, which Trace uses).

Feel free to file a feature request to have WiX fill in EventLogMessages.dll automatically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜