diff --git a/src/Paket.Core/Versioning/FrameworkHandling.fs b/src/Paket.Core/Versioning/FrameworkHandling.fs index 540f4d8244..2aa7b91157 100644 --- a/src/Paket.Core/Versioning/FrameworkHandling.fs +++ b/src/Paket.Core/Versioning/FrameworkHandling.fs @@ -129,18 +129,24 @@ type Net7WindowsVersion = [] type Net8WindowsVersion = + | V7_0 + | V8_0 | V10_0_17763_0 | V10_0_18362_0 | V10_0_19041_0 override this.ToString() = match this with + | V7_0 -> "7.0" + | V8_0 -> "8.0" | V10_0_17763_0 -> "10.0.17763.0" | V10_0_18362_0 -> "10.0.18362.0" | V10_0_19041_0 -> "10.0.19041.0" static member TryParse s = match s with - | "" | "10.0.17763.0" | "10.0.17763" -> Some Net8WindowsVersion.V10_0_17763_0 + | "" | "7.0" | "7" -> Some Net8WindowsVersion.V7_0 + | "8.0" | "8" -> Some Net8WindowsVersion.V8_0 + | "10.0.17763.0" | "10.0.17763" -> Some Net8WindowsVersion.V10_0_17763_0 | "10.0.18362.0" | "10.0.18362" -> Some Net8WindowsVersion.V10_0_18362_0 | "10.0.19041.0" | "10.0.19041" -> Some Net8WindowsVersion.V10_0_19041_0 | _ -> None @@ -963,7 +969,9 @@ type FrameworkIdentifier = | DotNet7Windows Net7WindowsVersion.V10_0_17763_0 -> [ DotNetFramework FrameworkVersion.V7; DotNet7Windows Net7WindowsVersion.V8_0 ] | DotNet7Windows Net7WindowsVersion.V10_0_18362_0 -> [ DotNetFramework FrameworkVersion.V7; DotNet7Windows Net7WindowsVersion.V10_0_17763_0 ] | DotNet7Windows Net7WindowsVersion.V10_0_19041_0 -> [ DotNetFramework FrameworkVersion.V7; DotNet7Windows Net7WindowsVersion.V10_0_18362_0 ] - | DotNet8Windows Net8WindowsVersion.V10_0_17763_0 -> [ DotNetFramework FrameworkVersion.V8; ] + | DotNet8Windows Net8WindowsVersion.V7_0 -> [ DotNetFramework FrameworkVersion.V8; ] + | DotNet8Windows Net8WindowsVersion.V8_0 -> [ DotNetFramework FrameworkVersion.V8; DotNet8Windows Net8WindowsVersion.V7_0] + | DotNet8Windows Net8WindowsVersion.V10_0_17763_0 -> [ DotNetFramework FrameworkVersion.V8; DotNet8Windows Net8WindowsVersion.V8_0] | DotNet8Windows Net8WindowsVersion.V10_0_18362_0 -> [ DotNetFramework FrameworkVersion.V8; DotNet8Windows Net8WindowsVersion.V10_0_17763_0 ] | DotNet8Windows Net8WindowsVersion.V10_0_19041_0 -> [ DotNetFramework FrameworkVersion.V8; DotNet8Windows Net8WindowsVersion.V10_0_18362_0 ] | DotNetStandard DotNetStandardVersion.V1_0 -> [ ] diff --git a/src/Paket.Core/Versioning/PlatformMatching.fs b/src/Paket.Core/Versioning/PlatformMatching.fs index 6541b87f7c..ae6d678a65 100644 --- a/src/Paket.Core/Versioning/PlatformMatching.fs +++ b/src/Paket.Core/Versioning/PlatformMatching.fs @@ -218,8 +218,8 @@ let getTargetCondition (target:TargetProfile) = | DotNetFramework(FrameworkVersion.V6) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", "$(TargetFrameworkVersion) == 'v6.0'" | DotNetFramework(FrameworkVersion.V5) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", "$(TargetFrameworkVersion) == 'v5.0'" | DotNetFramework(version) ->"$(TargetFrameworkIdentifier) == '.NETFramework'", sprintf "$(TargetFrameworkVersion) == '%O'" version - | DotNet8WithOs(os) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", sprintf "($(TargetFrameworkVersion) == 'v7.0' And '$(TargetPlatformIdentifier)' == '%O')" os - | DotNet8Windows(version) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", sprintf "($(TargetFrameworkVersion) == 'v7.0' And '$(TargetPlatformIdentifier)' == 'Windows' And '$(TargetPlatformVersion)' == '%O')" version + | DotNet8WithOs(os) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", sprintf "($(TargetFrameworkVersion) == 'v8.0' And '$(TargetPlatformIdentifier)' == '%O')" os + | DotNet8Windows(version) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", sprintf "($(TargetFrameworkVersion) == 'v8.0' And '$(TargetPlatformIdentifier)' == 'Windows' And '$(TargetPlatformVersion)' == '%O')" version | DotNet7WithOs(os) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", sprintf "($(TargetFrameworkVersion) == 'v7.0' And '$(TargetPlatformIdentifier)' == '%O')" os | DotNet7Windows(Net7WindowsVersion.V7_0) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", sprintf "($(TargetFrameworkVersion) == 'v7.0' And '$(TargetPlatformIdentifier)' == 'Windows')" | DotNet7Windows(version) ->"$(TargetFrameworkIdentifier) == '.NETCoreApp'", sprintf "($(TargetFrameworkVersion) == 'v7.0' And '$(TargetPlatformIdentifier)' == 'Windows' And '$(TargetPlatformVersion)' == '%O')" version diff --git a/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs.expected.xml b/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs.expected.xml index a2a0f78f66..082b812aac 100644 --- a/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs.expected.xml +++ b/tests/Paket.Tests/InstallModel/Xml/RxXaml.fs.expected.xml @@ -24,7 +24,7 @@ - + ..\..\..\Rx-XAML\lib\portable-win81+wpa81\System.Reactive.Windows.Threading.dll diff --git a/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs b/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs index 79ae842c46..693ee72313 100644 --- a/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs +++ b/tests/Paket.Tests/Versioning/PlatformMatchingSpecs.fs @@ -292,8 +292,8 @@ let ``Can detect a bunch of net8 platforms``() = let testSet = [ "net8" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNetFramework FrameworkVersion.V8) "net8000" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNetFramework FrameworkVersion.V8) - "net8.0-windows" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNet8Windows Net8WindowsVersion.V10_0_17763_0) - "net8-windows" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNet8Windows Net8WindowsVersion.V10_0_17763_0) + "net8.0-windows" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNet8Windows Net8WindowsVersion.V7_0) + "net8-windows" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNet8Windows Net8WindowsVersion.V7_0) "net8.0-windows10.0.19041.0" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNet8Windows Net8WindowsVersion.V10_0_19041_0) "net8.0-windows10.0.19041" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNet8Windows Net8WindowsVersion.V10_0_19041_0) "net8-windows10.0.19041" , TargetProfile.SinglePlatform (FrameworkIdentifier.DotNet8Windows Net8WindowsVersion.V10_0_19041_0)