Вопрос

I've seen a few questions here and there about creating event log sources using WiX. What puzzles me is why util:EventSource/@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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top