Skip to content

Commit

Permalink
Fix the analyzer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosifne committed Jan 3, 2024
1 parent b18ab1b commit 43ac484
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Compilers/VisualBasic/Test/Semantic/HasValidFonts.vb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ Friend Class HasValidFonts
Public Overrides ReadOnly Property ShouldSkip As Boolean
Get
Try
#If NET8_0 Then
If OperatingSystem.IsWindowsVersionAtLeast(6, 1) Then
#Else
If RuntimeInformation.IsOSPlatform(OSPlatform.Windows) AndAlso Environment.OSVersion.Version >= New Version(6, 1) Then
#End If
' SystemFont.DefaultFont is only available on windows 6.1 and later
Dim result = SystemFonts.DefaultFont
Return result Is Nothing
Expand Down

0 comments on commit 43ac484

Please sign in to comment.