Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/Paket.Core/Versioning/FrameworkHandling.fs
Original file line number Diff line number Diff line change
Expand Up @@ -150,44 +150,54 @@ type FrameworkVersion =
// Each time a new version is added NuGetPackageCache.CurrentCacheVersion should be bumped.
type UAPVersion =
| V10
| V10_0_14393
| V10_0_15138
| V10_0_16299
| V10_0_16300
| V10_0_18362
| V10_1
override this.ToString() =
match this with
| V10 -> "10.0"
| V10_0_14393 -> "10.0.14393"
| V10_0_15138 -> "10.0.15138"
| V10_0_16299 -> "10.0.16299"
| V10_0_16300 -> "10.0.16300"
| V10_0_18362 -> "10.0.18362"
| V10_1 -> "10.1"

member this.ShortString() =
match this with
| UAPVersion.V10 -> "10.0"
| UAPVersion.V10_0_14393 -> "10.0.14393"
| UAPVersion.V10_0_15138 -> "10.0.15138"
| UAPVersion.V10_0_16299 -> "10.0.16299"
| UAPVersion.V10_0_16300 -> "10.0.16300"
| UAPVersion.V10_0_18362 -> "10.0.18362"
| UAPVersion.V10_1 -> "10.1"

member this.NetCoreVersion =
// WTF: https://github.com/onovotny/MSBuildSdkExtras/blob/8d2d4ad63b552481da06e646dbb6504abc415260/src/build/platforms/Windows.targets
match this with
// Assumed from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore
| UAPVersion.V10
| UAPVersion.V10_0_14393
| UAPVersion.V10_0_15138
| UAPVersion.V10_0_16299
| UAPVersion.V10_0_16300 -> "v5.0"
| UAPVersion.V10_0_16300
| UAPVersion.V10_0_18362 -> "v5.0"
// No idea, for now use 5.0 to keep project files constant
// If someone starts complaining fix this and update the baselines.
| UAPVersion.V10_1 -> "v5.0"

static member TryParse s =
match s with
| "" | "1" | "10" -> Some UAPVersion.V10
| "10.0.14393" -> Some UAPVersion.V10_1
| "10.0.15138" -> Some UAPVersion.V10_1
| "10.0.16299" -> Some UAPVersion.V10_1
| "10.0.16300" -> Some UAPVersion.V10_1
| "10.0.18362" -> Some UAPVersion.V10_1
| "10.1" -> Some UAPVersion.V10_1
| _ -> None

Expand Down Expand Up @@ -611,9 +621,11 @@ type FrameworkIdentifier =
| XamarinTV -> [ DotNetStandard DotNetStandardVersion.V1_6 ]
| XamarinWatch -> [ DotNetStandard DotNetStandardVersion.V1_6 ]
| UAP UAPVersion.V10 -> [ Windows WindowsVersion.V8_1; WindowsPhoneApp WindowsPhoneAppVersion.V8_1; DotNetStandard DotNetStandardVersion.V1_4 ]
| UAP UAPVersion.V10_0_14393 -> [ UAP UAPVersion.V10 ]
| UAP UAPVersion.V10_0_15138 -> [ UAP UAPVersion.V10 ]
| UAP UAPVersion.V10_0_16299 -> [ UAP UAPVersion.V10; DotNetStandard DotNetStandardVersion.V2_0 ]
| UAP UAPVersion.V10_0_16300 -> [ UAP UAPVersion.V10; DotNetStandard DotNetStandardVersion.V2_0 ]
| UAP UAPVersion.V10_0_18362 -> [ UAP UAPVersion.V10; DotNetStandard DotNetStandardVersion.V2_0 ]
| UAP UAPVersion.V10_1 -> [ UAP UAPVersion.V10_0_15138 ]
| DotNetFramework FrameworkVersion.V1 -> [ ]
| DotNetFramework FrameworkVersion.V1_1 -> [ DotNetFramework FrameworkVersion.V1 ]
Expand Down Expand Up @@ -1238,9 +1250,11 @@ module KnownTargetProfiles =

let UAPVersons = [
UAPVersion.V10
UAPVersion.V10_0_14393
UAPVersion.V10_0_15138
UAPVersion.V10_0_16299
UAPVersion.V10_0_16300
UAPVersion.V10_0_18362
UAPVersion.V10_1
]

Expand Down