@@ -151,6 +151,8 @@ type Net8WindowsVersion =
151151 | " 10.0.19041.0" | " 10.0.19041" -> Some Net8WindowsVersion.V10_ 0_ 19041_ 0
152152 | _ -> None
153153
154+ type Net9WindowsVersion = Net8WindowsVersion
155+
154156[<RequireQualifiedAccess>]
155157type Net5Os =
156158 | Android
@@ -250,7 +252,8 @@ type Net8Os =
250252 ]
251253 |> Seq.tryFind( fun ( k , _ ) -> s.StartsWith k)
252254 |> Option.map snd
253-
255+
256+ type Net9Os = Net8Os
254257
255258[<RequireQualifiedAccess>]
256259/// The Framework version.
@@ -280,6 +283,7 @@ type FrameworkVersion =
280283 | V6
281284 | V7
282285 | V8
286+ | V9
283287 override this.ToString () =
284288 match this with
285289 | V1 -> " v1.0"
@@ -301,11 +305,12 @@ type FrameworkVersion =
301305 | V4_ 7_ 1 -> " v4.7.1"
302306 | V4_ 7_ 2 -> " v4.7.2"
303307 | V4_ 8 -> " v4.8"
304- | V4_ 8_ 1 -> " v4.8.1"
308+ | V4_ 8_ 1 -> " v4.8.1"
305309 | V5 -> " v5.0"
306310 | V6 -> " v6.0"
307311 | V7 -> " v7.0"
308312 | V8 -> " v8.0"
313+ | V9 -> " v9.0"
309314
310315 member this.ShortString () =
311316 match this with
@@ -333,6 +338,7 @@ type FrameworkVersion =
333338 | FrameworkVersion.V6 -> " 6.0"
334339 | FrameworkVersion.V7 -> " 7.0"
335340 | FrameworkVersion.V8 -> " 8.0"
341+ | FrameworkVersion.V9 -> " 9.0"
336342
337343 static member TryParse s =
338344 match s with
@@ -360,6 +366,7 @@ type FrameworkVersion =
360366 | " 6" -> Some FrameworkVersion.V6
361367 | " 7" -> Some FrameworkVersion.V7
362368 | " 8" -> Some FrameworkVersion.V8
369+ | " 9" -> Some FrameworkVersion.V9
363370 | _ -> None
364371
365372[<RequireQualifiedAccess>]
@@ -791,14 +798,16 @@ type TizenVersion =
791798// Each time a new version is added NuGetPackageCache.CurrentCacheVersion should be bumped.
792799type FrameworkIdentifier =
793800 | DotNetFramework of FrameworkVersion
801+ | DotNet5WithOs of Net5Os
802+ | DotNet5Windows of Net5WindowsVersion
794803 | DotNet6WithOs of Net6Os
795804 | DotNet6Windows of Net6WindowsVersion
796805 | DotNet7WithOs of Net7Os
797806 | DotNet7Windows of Net7WindowsVersion
798807 | DotNet8WithOs of Net8Os
799808 | DotNet8Windows of Net8WindowsVersion
800- | DotNet5WithOs of Net5Os
801- | DotNet5Windows of Net5WindowsVersion
809+ | DotNet9WithOs of Net9Os
810+ | DotNet9Windows of Net9WindowsVersion
802811 | UAP of UAPVersion
803812 | DotNetStandard of DotNetStandardVersion
804813 | DotNetCoreApp of DotNetCoreAppVersion
@@ -822,6 +831,8 @@ type FrameworkIdentifier =
822831 override x.ToString () =
823832 match x with
824833 | DotNetFramework v -> " net" + v.ShortString()
834+ | DotNet9WithOs o -> " net9.0-" + o.ToString()
835+ | DotNet9Windows v -> " net9.0-windows" + v.ToString()
825836 | DotNet8WithOs o -> " net8.0-" + o.ToString()
826837 | DotNet8Windows v -> " net8.0-windows" + v.ToString()
827838 | DotNet7WithOs o -> " net7.0-" + o.ToString()
@@ -934,6 +945,7 @@ type FrameworkIdentifier =
934945 | DotNetFramework FrameworkVersion.V6 -> [ DotNetFramework FrameworkVersion.V5 ]
935946 | DotNetFramework FrameworkVersion.V7 -> [ DotNetFramework FrameworkVersion.V6 ]
936947 | DotNetFramework FrameworkVersion.V8 -> [ DotNetFramework FrameworkVersion.V7 ]
948+ | DotNetFramework FrameworkVersion.V9 -> [ DotNetFramework FrameworkVersion.V8 ]
937949 | DotNet5WithOs Net5Os.Android -> [ DotNetFramework FrameworkVersion.V5; MonoAndroid MonoAndroidVersion.V12 ]
938950 | DotNet5WithOs Net5Os.IOs -> [ DotNetFramework FrameworkVersion.V5; XamariniOS ]
939951 | DotNet5WithOs Net5Os.MacOs -> [ DotNetFramework FrameworkVersion.V5; XamarinMac ]
@@ -974,6 +986,7 @@ type FrameworkIdentifier =
974986 | DotNet8Windows Net8WindowsVersion.V10_ 0_ 17763_ 0 -> [ DotNetFramework FrameworkVersion.V8; DotNet8Windows Net8WindowsVersion.V8_ 0]
975987 | DotNet8Windows Net8WindowsVersion.V10_ 0_ 18362_ 0 -> [ DotNetFramework FrameworkVersion.V8; DotNet8Windows Net8WindowsVersion.V10_ 0_ 17763_ 0 ]
976988 | DotNet8Windows Net8WindowsVersion.V10_ 0_ 19041_ 0 -> [ DotNetFramework FrameworkVersion.V8; DotNet8Windows Net8WindowsVersion.V10_ 0_ 18362_ 0 ]
989+ // remark: for now, windows version for net 9 is alias to 8
977990 | DotNetStandard DotNetStandardVersion.V1_ 0 -> [ ]
978991 | DotNetStandard DotNetStandardVersion.V1_ 1 -> [ DotNetStandard DotNetStandardVersion.V1_ 0 ]
979992 | DotNetStandard DotNetStandardVersion.V1_ 2 -> [ DotNetStandard DotNetStandardVersion.V1_ 1 ]
@@ -1530,6 +1543,7 @@ module KnownTargetProfiles =
15301543 FrameworkVersion.V6
15311544 FrameworkVersion.V7
15321545 FrameworkVersion.V8
1546+ FrameworkVersion.V9
15331547 ]
15341548
15351549 let DotNetFrameworkIdentifiers =
@@ -1634,6 +1648,11 @@ module KnownTargetProfiles =
16341648 DotNet8WindowsVersions
16351649 |> List.map ( DotNet8Windows >> TargetProfile.SinglePlatform)
16361650
1651+ let DotNet9OperatingSystems = DotNet8OperatingSystems
1652+ let DotNet9WithOsProfiles = DotNet8WithOsProfiles
1653+ let DotNet9WindowsVersions = DotNet8WindowsVersions
1654+ let DotNet9WindowsProfiles = DotNet8WindowsProfiles
1655+
16371656 let DotNetStandardVersions = [
16381657 DotNetStandardVersion.V1_ 0
16391658 DotNetStandardVersion.V1_ 1
@@ -1805,6 +1824,8 @@ module KnownTargetProfiles =
18051824
18061825 let AllDotNetProfiles =
18071826 DotNetFrameworkProfiles @
1827+ DotNet9WithOsProfiles @
1828+ DotNet9WindowsProfiles @
18081829 DotNet8WithOsProfiles @
18091830 DotNet8WindowsProfiles @
18101831 DotNet7WithOsProfiles @
0 commit comments