<PackageReference Include="System.Diagnostics.EventLog" Version="5.0.0-preview.2.20160.6" />

EventLogException

public class EventLogException : Exception
Represents the base class for all the exceptions that are thrown when an error occurs while reading event log related information.
using System.Runtime.Serialization; namespace System.Diagnostics.Eventing.Reader { public class EventLogException : Exception { public override string Message { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } } public EventLogException() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } protected EventLogException(int errorCode) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } protected EventLogException(SerializationInfo serializationInfo, StreamingContext streamingContext) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public EventLogException(string message) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public EventLogException(string message, Exception innerException) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } public override void GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_EventLog); } } }