serilog-sinks-eventlog icon indicating copy to clipboard operation
serilog-sinks-eventlog copied to clipboard

CA1416: Validate platform compatibility

Open davidjamartin opened this issue 3 years ago • 1 comments

As the event log is only supported on the Windows Platform, should the classes be decorated with the SupportedOSPlatform attribute?

[SupportedOSPlatform("windows")]

See here for more information: https://docs.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/quality-rules/ca1416

davidjamartin avatar Nov 18 '21 11:11 davidjamartin

This would make sense, especially as there is https://github.com/serilog/serilog-sinks-eventlog/blob/dac4ef3e2fa3ce4d389c15f22c7141430791ffb0/src/Serilog.Sinks.EventLog/LoggerConfigurationEventLogExtensions.cs#L68-L71

gfoidl avatar May 30 '22 15:05 gfoidl

Is this fixed now? ref https://github.com/serilog/serilog-sinks-eventlog/pull/52 / https://github.com/serilog/serilog-sinks-eventlog/pull/58

Numpsy avatar Jun 30 '24 10:06 Numpsy