diff --git a/src/Paket.Core/FrameworkHandling.fs b/src/Paket.Core/FrameworkHandling.fs index ca1b08363d..34c7a1e1b3 100644 --- a/src/Paket.Core/FrameworkHandling.fs +++ b/src/Paket.Core/FrameworkHandling.fs @@ -90,6 +90,15 @@ type DotNetStandardVersion = | DotNetStandardVersion.V1_5 -> "15" | DotNetStandardVersion.V1_6 -> "16" +[] +/// The UAP version. +type UAPVersion = + | V10 + override this.ToString() = + match this with + | V10 -> "10.0.14393.0" + + [] /// The .NET Standard version. type DotNetCoreVersion = @@ -115,6 +124,7 @@ module KnownAliases = "windowsPhoneApp", "wpa" ".netportable", "portable" "netportable", "portable" + "10.0", "100" "0.0", "" ".", "" " ", "" ] @@ -124,6 +134,7 @@ module KnownAliases = /// Framework Identifier type. type FrameworkIdentifier = | DotNetFramework of FrameworkVersion + | UAP of UAPVersion | DNX of FrameworkVersion | DNXCore of FrameworkVersion | DotNetStandard of DotNetStandardVersion @@ -171,6 +182,7 @@ type FrameworkIdentifier = | Runtimes(_) -> [ ] | XamariniOS -> [ ] | XamarinMac -> [ ] + | UAP UAPVersion.V10 -> [ ] | DotNetFramework FrameworkVersion.V1 -> [ ] | DotNetFramework FrameworkVersion.V1_1 -> [ DotNetFramework FrameworkVersion.V1 ] | DotNetFramework FrameworkVersion.V2 -> [ DotNetFramework FrameworkVersion.V1_1 ] @@ -217,6 +229,7 @@ type FrameworkIdentifier = /// Return if the parameter is of the same framework category (dotnet, windows phone, silverlight, ...) member x.IsSameCategoryAs y = match (x, y) with + | UAP _, UAP _ -> true | DotNetFramework _, DotNetFramework _ -> true | DotNetStandard _, DotNetStandard _ -> true | DotNetCore _, DotNetCore _ -> true @@ -272,6 +285,8 @@ type FrameworkIdentifier = member x.IsBetween(a,b) = x.IsAtLeast a && x.IsAtMost b module FrameworkDetection = + open Logging + let Extract = memoize (fun (path:string) -> @@ -299,6 +314,7 @@ module FrameworkDetection = | "net461" -> Some (DotNetFramework FrameworkVersion.V4_6_1) | "net462" -> Some (DotNetFramework FrameworkVersion.V4_6_2) | "net463" -> Some (DotNetFramework FrameworkVersion.V4_6_3) + | "uap100" -> Some (UAP UAPVersion.V10) | "monotouch" | "monotouch10" | "monotouch1" -> Some MonoTouch | "monoandroid" | "monoandroid10" | "monoandroid1" | "monoandroid22" | "monoandroid23" | "monoandroid44" | "monoandroid403" | "monoandroid43" | "monoandroid41" | "monoandroid50" | "monoandroid60" -> Some MonoAndroid | "monomac" | "monomac10" | "monomac1" -> Some MonoMac @@ -488,6 +504,9 @@ module KnownTargetProfiles = SinglePlatform(Silverlight "v4.0") SinglePlatform(Silverlight "v5.0")] + let UAPProfiles = + [SinglePlatform(UAP UAPVersion.V10)] + let WindowsPhoneSilverlightProfiles = [SinglePlatform(WindowsPhoneSilverlight "v7.0") SinglePlatform(WindowsPhoneSilverlight "v7.1") @@ -558,6 +577,7 @@ module KnownTargetProfiles = let AllDotNetProfiles = DotNetFrameworkProfiles @ WindowsProfiles @ + UAPProfiles @ SilverlightProfiles @ WindowsPhoneSilverlightProfiles @ [SinglePlatform(MonoAndroid) diff --git a/src/Paket.Core/InstallModel.fs b/src/Paket.Core/InstallModel.fs index ab54e8cdca..4453533a30 100644 --- a/src/Paket.Core/InstallModel.fs +++ b/src/Paket.Core/InstallModel.fs @@ -4,6 +4,7 @@ open System open System.IO open Paket.Domain open Paket.Requirements +open Logging [] type Reference = @@ -126,6 +127,7 @@ type InstallModel = [] module InstallModel = + open Logging let emptyModel packageName packageVersion = { PackageName = packageName @@ -248,7 +250,7 @@ module InstallModel = let addLibReferences libs references (installModel:InstallModel) : InstallModel = let libs = libs |> Seq.toList - let libFolders = calcLibFolders installModel.PackageName libs + let libFolders = calcLibFolders installModel.PackageName libs let refFolders = calcRefFolders installModel.PackageName libs let addItem extract addFunc getFolder initialState = @@ -414,7 +416,6 @@ module InstallModel = |> removeIfCompletelyEmpty |> addLicense nuspec.LicenseUrl - type InstallModel with static member EmptyModel (packageName, packageVersion) = InstallModel.emptyModel packageName packageVersion diff --git a/src/Paket.Core/NugetConvert.fs b/src/Paket.Core/NugetConvert.fs index 9bd4d0daef..0db40abdb9 100644 --- a/src/Paket.Core/NugetConvert.fs +++ b/src/Paket.Core/NugetConvert.fs @@ -182,7 +182,7 @@ module NugetEnv = let readPackages (projectFile : ProjectFile) : Result, DomainMessage> = let path = Path.Combine(Path.GetDirectoryName(projectFile.FileName), Constants.PackagesConfigFile) if File.Exists path then - path |> FileInfo |> readSingle |> lift Some + FileInfo(path) |> readSingle |> lift Some else Result.Succeed None |> lift (fun configFile -> (projectFile,configFile)) diff --git a/src/Paket.Core/PlatformMatching.fs b/src/Paket.Core/PlatformMatching.fs index d24f16e77b..9dcb0d1641 100644 --- a/src/Paket.Core/PlatformMatching.fs +++ b/src/Paket.Core/PlatformMatching.fs @@ -181,6 +181,7 @@ let getTargetCondition (target:TargetProfile) = | MonoTouch -> "$(TargetFrameworkIdentifier) == 'MonoTouch'", "" | MonoMac -> "$(TargetFrameworkIdentifier) == 'MonoMac'", "" | XamariniOS -> "$(TargetFrameworkIdentifier) == 'Xamarin.iOS'", "" + | UAP(version) ->"$(TargetPlatformIdentifier) == 'UAP'", sprintf "$(TargetPlatformVersion) == '%O'" version | XamarinMac -> "$(TargetFrameworkIdentifier) == 'Xamarin.Mac'", "" | Native("","") -> "true", "" | Native("",bits) -> (sprintf "'$(Platform)'=='%s'" bits), "" diff --git a/src/Paket.Core/ProjectFile.fs b/src/Paket.Core/ProjectFile.fs index 5fa829b40a..8443f10632 100644 --- a/src/Paket.Core/ProjectFile.fs +++ b/src/Paket.Core/ProjectFile.fs @@ -718,10 +718,10 @@ module ProjectFile = Some(propertyName,createRelativePath project.FileName fi.FullName,path.Substring(0,path.LastIndexOf("build\\") + 6))) |> Set.ofSeq - propertyNames,propertyGroup + propertyNames,propertyGroup let allTargets = - model.GetReferenceFolders() + model.GetReferenceFolders() |> List.map (fun lib -> lib.Targets) let conditions = @@ -989,12 +989,13 @@ module ProjectFile = deleteCustomModelNodes (snd kv.Value) project let installSettings = snd usedPackages.[kv.Key] let restrictionList = installSettings.FrameworkRestrictions |> getRestrictionList + let projectModel = (snd kv.Value) .ApplyFrameworkRestrictions(restrictionList) .FilterExcludes(installSettings.Excludes) .RemoveIfCompletelyEmpty() - + if directPackages.ContainsKey kv.Key then match getTargetFramework project with | Some targetFramework -> diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index 40a970ba8b..6c52850c99 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -55,8 +55,8 @@ D:\code\PaketKopie update -f D:\code\Paket\integrationtests\scenarios\i001117-aws\temp - install - D:\code\Paket\integrationtests\scenarios\i001663-google-apis\temp + install -v + D:\temp\IconPacksTestApp\src 11