public static bool IsWindows10Version2004Build19573OrGreater => IsWindowsVersionOrLater(10, 0, 19573);
+ // Windows 11 aka 21H2
+ public static bool IsWindows10Version22000OrGreater => IsWindowsVersionOrLater(10, 0, 22000);
+
public static bool IsWindowsIoTCore
{
get
[ConditionalFact(typeof(Helpers), nameof(Helpers.SupportsEventLogs))]
public void ExceptionOnce()
{
- if (PlatformDetection.IsWindows7) // Null events in PowerShell log
+ if (PlatformDetection.IsWindows7 || // Null events in PowerShell log
+ PlatformDetection.IsWindows10Version22000OrGreater) // ActiveIssue("https://github.com/dotnet/runtime/issues/58829")
return;
var query = new EventLogQuery("Application", PathType.LogName, "*[System]") { ReverseDirection = true };
var eventLog = new EventLogReader(query, Helpers.GetBookmark("Application", PathType.LogName));
[InlineData(false)]
public void ProviderNameTests(bool noProviderName)
{
+ if (PlatformDetection.IsWindows10Version22000OrGreater) // ActiveIssue("https://github.com/dotnet/runtime/issues/58829")
+ return;
+
string log = "Application";
string source = "Source_" + nameof(ProviderNameTests);
using (var session = new EventLogSession())
private static readonly StringWithQualityHeaderValue s_gzipHeaderValue = new StringWithQualityHeaderValue("gzip");
private static readonly StringWithQualityHeaderValue s_deflateHeaderValue = new StringWithQualityHeaderValue("deflate");
- private static readonly Lazy<bool> s_supportsTls13 = new Lazy<bool>(CheckTls13Support());
+ private static readonly Lazy<bool> s_supportsTls13 = new Lazy<bool>(() => CheckTls13Support());
[ThreadStatic]
private static StringBuilder? t_requestHeadersBuilder;