@@ -103,6 +103,30 @@ type Net6WindowsVersion =
103103 | " 10.0.19041.0" | " 10.0.19041" -> Some Net6WindowsVersion.V10_ 0_ 19041_ 0
104104 | _ -> None
105105
106+ [<RequireQualifiedAccess>]
107+ type Net7WindowsVersion =
108+ | V7_ 0
109+ | V8_ 0
110+ | V10_ 0_ 17763_ 0
111+ | V10_ 0_ 18362_ 0
112+ | V10_ 0_ 19041_ 0
113+ override this.ToString () =
114+ match this with
115+ | V7_ 0 -> " 7.0"
116+ | V8_ 0 -> " 8.0"
117+ | V10_ 0_ 17763_ 0 -> " 10.0.17763.0"
118+ | V10_ 0_ 18362_ 0 -> " 10.0.18362.0"
119+ | V10_ 0_ 19041_ 0 -> " 10.0.19041.0"
120+
121+ static member TryParse s =
122+ match s with
123+ | " " | " 7.0" | " 7" -> Some Net7WindowsVersion.V7_ 0
124+ | " 8.0" | " 8" -> Some Net7WindowsVersion.V8_ 0
125+ | " 10.0.17763.0" | " 10.0.17763" -> Some Net7WindowsVersion.V10_ 0_ 17763_ 0
126+ | " 10.0.18362.0" | " 10.0.18362" -> Some Net7WindowsVersion.V10_ 0_ 18362_ 0
127+ | " 10.0.19041.0" | " 10.0.19041" -> Some Net7WindowsVersion.V10_ 0_ 19041_ 0
128+ | _ -> None
129+
106130[<RequireQualifiedAccess>]
107131type Net5Os =
108132 | Android
@@ -152,7 +176,31 @@ type Net6Os =
152176 ] |> Seq.tryFind( fun ( k , _ ) -> s.StartsWith k)
153177 |> Option.map snd
154178
155-
179+ [<RequireQualifiedAccess>]
180+ type Net7Os =
181+ | Android
182+ | IOs
183+ | MacOs
184+ | TvOs
185+ | WatchOs
186+ override this.ToString () =
187+ match this with
188+ | Android -> " android"
189+ | IOs -> " ios"
190+ | MacOs -> " macos"
191+ | TvOs -> " tvos"
192+ | WatchOs -> " watchos"
193+
194+ static member TryParse ( s : string ) =
195+ [
196+ ( " android" , Net6Os.Android)
197+ ( " ios" , Net6Os.IOs)
198+ ( " macos" , Net6Os.MacOs)
199+ ( " tvos" , Net6Os.TvOs)
200+ ( " watchos" , Net6Os.WatchOs)
201+ ] |> Seq.tryFind( fun ( k , _ ) -> s.StartsWith k)
202+ |> Option.map snd
203+
156204
157205[<RequireQualifiedAccess>]
158206/// The Framework version.
@@ -179,6 +227,7 @@ type FrameworkVersion =
179227 | V4_ 8
180228 | V5
181229 | V6
230+ | V7
182231 override this.ToString () =
183232 match this with
184233 | V1 -> " v1.0"
@@ -202,6 +251,7 @@ type FrameworkVersion =
202251 | V4_ 8 -> " v4.8"
203252 | V5 -> " v5.0"
204253 | V6 -> " v6.0"
254+ | V7 -> " v7.0"
205255
206256 member this.ShortString () =
207257 match this with
@@ -226,6 +276,7 @@ type FrameworkVersion =
226276 | FrameworkVersion.V4_ 8 -> " 48"
227277 | FrameworkVersion.V5 -> " 5.0"
228278 | FrameworkVersion.V6 -> " 6.0"
279+ | FrameworkVersion.V7 -> " 7.0"
229280
230281 static member TryParse s =
231282 match s with
@@ -250,6 +301,7 @@ type FrameworkVersion =
250301 | " 4.8" -> Some FrameworkVersion.V4_ 8
251302 | " 5" -> Some FrameworkVersion.V5
252303 | " 6" -> Some FrameworkVersion.V6
304+ | " 7" -> Some FrameworkVersion.V7
253305 | _ -> None
254306
255307[<RequireQualifiedAccess>]
@@ -683,6 +735,8 @@ type FrameworkIdentifier =
683735 | DotNetFramework of FrameworkVersion
684736 | DotNet6WithOs of Net6Os
685737 | DotNet6Windows of Net6WindowsVersion
738+ | DotNet7WithOs of Net7Os
739+ | DotNet7Windows of Net7WindowsVersion
686740 | DotNet5WithOs of Net5Os
687741 | DotNet5Windows of Net5WindowsVersion
688742 | UAP of UAPVersion
@@ -708,6 +762,8 @@ type FrameworkIdentifier =
708762 override x.ToString () =
709763 match x with
710764 | DotNetFramework v -> " net" + v.ShortString()
765+ | DotNet7WithOs o -> " net7.0-" + o.ToString()
766+ | DotNet7Windows v -> " net7.0-windows" + v.ToString()
711767 | DotNet6WithOs o -> " net6.0-" + o.ToString()
712768 | DotNet6Windows v -> " net6.0-windows" + v.ToString()
713769 | DotNet5WithOs o -> " net5.0-" + o.ToString()
@@ -813,6 +869,7 @@ type FrameworkIdentifier =
813869 | DotNetFramework FrameworkVersion.V4_ 8 -> [ DotNetFramework FrameworkVersion.V4_ 7_ 2 ]
814870 | DotNetFramework FrameworkVersion.V5 -> [ DotNetCoreApp DotNetCoreAppVersion.V3_ 1; DotNetStandard DotNetStandardVersion.V2_ 1 ]
815871 | DotNetFramework FrameworkVersion.V6 -> [ DotNetFramework FrameworkVersion.V5 ]
872+ | DotNetFramework FrameworkVersion.V7 -> [ DotNetFramework FrameworkVersion.V6 ]
816873 | DotNet5WithOs Net5Os.Android -> [ DotNetFramework FrameworkVersion.V5; MonoAndroid MonoAndroidVersion.V12 ]
817874 | DotNet5WithOs Net5Os.IOs -> [ DotNetFramework FrameworkVersion.V5; XamariniOS ]
818875 | DotNet5WithOs Net5Os.MacOs -> [ DotNetFramework FrameworkVersion.V5; XamarinMac ]
@@ -828,11 +885,21 @@ type FrameworkIdentifier =
828885 | DotNet6WithOs Net6Os.MacOs -> [ DotNetFramework FrameworkVersion.V6; XamarinMac ]
829886 | DotNet6WithOs Net6Os.TvOs -> [ DotNetFramework FrameworkVersion.V6; XamarinTV ]
830887 | DotNet6WithOs Net6Os.WatchOs -> [ DotNetFramework FrameworkVersion.V6; XamarinWatch ]
888+ | DotNet7WithOs Net7Os.Android -> [ DotNetFramework FrameworkVersion.V7; MonoAndroid MonoAndroidVersion.V12 ]
889+ | DotNet7WithOs Net7Os.IOs -> [ DotNetFramework FrameworkVersion.V7; XamariniOS ]
890+ | DotNet7WithOs Net7Os.MacOs -> [ DotNetFramework FrameworkVersion.V7; XamarinMac ]
891+ | DotNet7WithOs Net7Os.TvOs -> [ DotNetFramework FrameworkVersion.V7; XamarinTV ]
892+ | DotNet7WithOs Net7Os.WatchOs -> [ DotNetFramework FrameworkVersion.V7; XamarinWatch ]
831893 | DotNet6Windows Net6WindowsVersion.V7_ 0 -> [ DotNetFramework FrameworkVersion.V6 ]
832894 | DotNet6Windows Net6WindowsVersion.V8_ 0 -> [ DotNetFramework FrameworkVersion.V6; DotNet6Windows Net6WindowsVersion.V7_ 0 ]
833895 | DotNet6Windows Net6WindowsVersion.V10_ 0_ 17763_ 0 -> [ DotNetFramework FrameworkVersion.V6; DotNet6Windows Net6WindowsVersion.V8_ 0 ]
834896 | DotNet6Windows Net6WindowsVersion.V10_ 0_ 18362_ 0 -> [ DotNetFramework FrameworkVersion.V6; DotNet6Windows Net6WindowsVersion.V10_ 0_ 17763_ 0 ]
835897 | DotNet6Windows Net6WindowsVersion.V10_ 0_ 19041_ 0 -> [ DotNetFramework FrameworkVersion.V6; DotNet6Windows Net6WindowsVersion.V10_ 0_ 18362_ 0 ]
898+ | DotNet7Windows Net7WindowsVersion.V7_ 0 -> [ DotNetFramework FrameworkVersion.V7 ]
899+ | DotNet7Windows Net7WindowsVersion.V8_ 0 -> [ DotNetFramework FrameworkVersion.V7; DotNet7Windows Net7WindowsVersion.V7_ 0 ]
900+ | DotNet7Windows Net7WindowsVersion.V10_ 0_ 17763_ 0 -> [ DotNetFramework FrameworkVersion.V7; DotNet7Windows Net7WindowsVersion.V8_ 0 ]
901+ | DotNet7Windows Net7WindowsVersion.V10_ 0_ 18362_ 0 -> [ DotNetFramework FrameworkVersion.V7; DotNet7Windows Net7WindowsVersion.V10_ 0_ 17763_ 0 ]
902+ | DotNet7Windows Net7WindowsVersion.V10_ 0_ 19041_ 0 -> [ DotNetFramework FrameworkVersion.V7; DotNet7Windows Net7WindowsVersion.V10_ 0_ 18362_ 0 ]
836903 | DotNetStandard DotNetStandardVersion.V1_ 0 -> [ ]
837904 | DotNetStandard DotNetStandardVersion.V1_ 1 -> [ DotNetStandard DotNetStandardVersion.V1_ 0 ]
838905 | DotNetStandard DotNetStandardVersion.V1_ 2 -> [ DotNetStandard DotNetStandardVersion.V1_ 1 ]
@@ -946,6 +1013,7 @@ module FrameworkDetection =
9461013 |> function
9471014 | Some " 5" when dotnetVersionX = 5 -> tryParseSecondPart parts.[ 1 ]
9481015 | Some " 6" when dotnetVersionX = 6 -> tryParseSecondPart parts.[ 1 ]
1016+ | Some " 7" when dotnetVersionX = 7 -> tryParseSecondPart parts.[ 1 ]
9491017 | _ -> None
9501018 else
9511019 None
@@ -958,6 +1026,7 @@ module FrameworkDetection =
9581026 |> function
9591027 | Some " 5" when dotnetVersionX = 5 -> tryParseVersion winVersionPart
9601028 | Some " 6" when dotnetVersionX = 6 -> tryParseVersion winVersionPart
1029+ | Some " 7" when dotnetVersionX = 7 -> tryParseVersion winVersionPart
9611030 | _ -> None
9621031 else
9631032 None
@@ -1378,6 +1447,7 @@ module KnownTargetProfiles =
13781447 FrameworkVersion.V4_ 8
13791448 FrameworkVersion.V5
13801449 FrameworkVersion.V6
1450+ FrameworkVersion.V7
13811451 ]
13821452
13831453 let DotNetFrameworkIdentifiers =
@@ -1436,6 +1506,30 @@ module KnownTargetProfiles =
14361506 DotNet6WindowsVersions
14371507 |> List.map ( DotNet6Windows >> TargetProfile.SinglePlatform)
14381508
1509+ let DotNet7OperatingSystems = [
1510+ Net7Os.Android
1511+ Net7Os.IOs
1512+ Net7Os.MacOs
1513+ Net7Os.TvOs
1514+ Net7Os.WatchOs
1515+ ]
1516+
1517+ let DotNet7WithOsProfiles =
1518+ DotNet7OperatingSystems
1519+ |> List.map ( DotNet7WithOs >> TargetProfile.SinglePlatform)
1520+
1521+ let DotNet7WindowsVersions = [
1522+ Net7WindowsVersion.V7_ 0
1523+ Net7WindowsVersion.V8_ 0
1524+ Net7WindowsVersion.V10_ 0_ 17763_ 0
1525+ Net7WindowsVersion.V10_ 0_ 18362_ 0
1526+ Net7WindowsVersion.V10_ 0_ 19041_ 0
1527+ ]
1528+
1529+ let DotNet7WindowsProfiles =
1530+ DotNet7WindowsVersions
1531+ |> List.map ( DotNet7Windows >> TargetProfile.SinglePlatform)
1532+
14391533 let DotNetStandardVersions = [
14401534 DotNetStandardVersion.V1_ 0
14411535 DotNetStandardVersion.V1_ 1
@@ -1607,6 +1701,8 @@ module KnownTargetProfiles =
16071701
16081702 let AllDotNetProfiles =
16091703 DotNetFrameworkProfiles @
1704+ DotNet7WithOsProfiles @
1705+ DotNet7WindowsProfiles @
16101706 DotNet6WithOsProfiles @
16111707 DotNet6WindowsProfiles @
16121708 DotNet5WithOsProfiles @
0 commit comments