diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 6d8eb69b41..738acf8947 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,3 +1,6 @@
+#### 1.15.1 - 18.06.2015
+* Detection of DNX and DNXCore frameworks
+
#### 1.15.0 - 18.06.2015
* Paket.PowerShell support for Paket Manager Console - https://github.com/fsprojects/Paket/pull/875
* Fix download of outdated files - https://github.com/fsprojects/Paket/issues/876
diff --git a/src/Paket.Core/FrameworkHandling.fs b/src/Paket.Core/FrameworkHandling.fs
index 37d15d9abf..17ca25bd4d 100644
--- a/src/Paket.Core/FrameworkHandling.fs
+++ b/src/Paket.Core/FrameworkHandling.fs
@@ -18,6 +18,7 @@ type FrameworkVersion =
| V4_5_2
| V4_5_3
| V4_6
+ | V5_0
override this.ToString() =
match this with
| V1 -> "v1.0"
@@ -32,6 +33,23 @@ type FrameworkVersion =
| V4_5_2 -> "v4.5.2"
| V4_5_3 -> "v4.5.3"
| V4_6 -> "v4.6"
+ | V5_0 -> "v5.0"
+
+ member this.ShortString() =
+ match this with
+ | FrameworkVersion.V1 -> "10"
+ | FrameworkVersion.V1_1 -> "11"
+ | FrameworkVersion.V2 -> "20"
+ | FrameworkVersion.V3 -> "30"
+ | FrameworkVersion.V3_5 -> "35"
+ | FrameworkVersion.V4_Client -> "40"
+ | FrameworkVersion.V4 -> "40"
+ | FrameworkVersion.V4_5 -> "45"
+ | FrameworkVersion.V4_5_1 -> "451"
+ | FrameworkVersion.V4_5_2 -> "452"
+ | FrameworkVersion.V4_5_3 -> "453"
+ | FrameworkVersion.V4_6 -> "46"
+ | FrameworkVersion.V5_0 -> "50"
module KnownAliases =
let Data =
@@ -52,6 +70,8 @@ module KnownAliases =
/// Framework Identifier type.
type FrameworkIdentifier =
| DotNetFramework of FrameworkVersion
+ | DNX of FrameworkVersion
+ | DNXCore of FrameworkVersion
| MonoAndroid
| MonoTouch
| MonoMac
@@ -63,21 +83,9 @@ type FrameworkIdentifier =
override x.ToString() =
match x with
- | DotNetFramework v ->
- "net" +
- match v with
- | FrameworkVersion.V1 -> "10"
- | FrameworkVersion.V1_1 -> "11"
- | FrameworkVersion.V2 -> "20"
- | FrameworkVersion.V3 -> "30"
- | FrameworkVersion.V3_5 -> "35"
- | FrameworkVersion.V4_Client -> "40"
- | FrameworkVersion.V4 -> "40"
- | FrameworkVersion.V4_5 -> "45"
- | FrameworkVersion.V4_5_1 -> "451"
- | FrameworkVersion.V4_5_2 -> "452"
- | FrameworkVersion.V4_5_3 -> "453"
- | FrameworkVersion.V4_6 -> "46"
+ | DotNetFramework v -> "net" + v.ShortString()
+ | DNX v -> "dnx" + v.ShortString()
+ | DNXCore v -> "dnxcore" + v.ShortString()
| MonoAndroid -> "monoandroid"
| MonoTouch -> "monotouch"
| MonoMac -> "monomac"
@@ -105,6 +113,9 @@ type FrameworkIdentifier =
| DotNetFramework FrameworkVersion.V4_5_2 -> [ DotNetFramework FrameworkVersion.V4_5_1 ]
| DotNetFramework FrameworkVersion.V4_5_3 -> [ DotNetFramework FrameworkVersion.V4_5_2 ]
| DotNetFramework FrameworkVersion.V4_6 -> [ DotNetFramework FrameworkVersion.V4_5_3 ]
+ | DotNetFramework FrameworkVersion.V5_0 -> [ DotNetFramework FrameworkVersion.V4_6 ]
+ | DNX _ -> [ ]
+ | DNXCore _ -> [ ]
| Silverlight "v3.0" -> [ ]
| Silverlight "v4.0" -> [ Silverlight "v3.0" ]
| Silverlight "v5.0" -> [ Silverlight "v4.0" ]
@@ -161,6 +172,8 @@ module FrameworkDetection =
| "wp71" | "sl4-wp71" | "sl4-wp" -> Some (WindowsPhoneSilverlight "v7.1")
| "wp8" | "wp80" | "wpv80" -> Some (WindowsPhoneSilverlight "v8.0")
| "wpa00" | "wpa81" -> Some (WindowsPhoneApp "v8.1")
+ | "dnx451" -> Some(DNX FrameworkVersion.V4_5_1)
+ | "dnxcore50" -> Some(DNXCore FrameworkVersion.V5_0)
| _ -> None
cache.[path] <- result
diff --git a/src/Paket.Core/PlatformMatching.fs b/src/Paket.Core/PlatformMatching.fs
index ee46f4a551..e1f8d789e5 100644
--- a/src/Paket.Core/PlatformMatching.fs
+++ b/src/Paket.Core/PlatformMatching.fs
@@ -109,6 +109,8 @@ let getTargetCondition (target:TargetProfile) =
| SinglePlatform(platform) ->
match platform with
| DotNetFramework(version) ->"$(TargetFrameworkIdentifier) == '.NETFramework'", sprintf "$(TargetFrameworkVersion) == '%O'" version
+ | DNX(version) ->"$(TargetFrameworkIdentifier) == 'DNX'", sprintf "$(TargetFrameworkVersion) == '%O'" version
+ | DNXCore(version) ->"$(TargetFrameworkIdentifier) == 'DNXCore'", sprintf "$(TargetFrameworkVersion) == '%O'" version
| Windows(version) -> "$(TargetFrameworkIdentifier) == '.NETCore'", sprintf "$(TargetFrameworkVersion) == '%O'" version
| Silverlight(version) -> "$(TargetFrameworkIdentifier) == 'Silverlight'", sprintf "$(TargetFrameworkVersion) == '%O'" version
| WindowsPhoneApp(version) -> "$(TargetFrameworkIdentifier) == 'WindowsPhoneApp'", sprintf "$(TargetFrameworkVersion) == '%O'" version
diff --git a/src/Paket.Core/Requirements.fs b/src/Paket.Core/Requirements.fs
index 4a76922412..cd844696a2 100644
--- a/src/Paket.Core/Requirements.fs
+++ b/src/Paket.Core/Requirements.fs
@@ -74,7 +74,7 @@ let optimizeRestrictions packages =
[for restriction,packages in expanded do
match restriction with
| FrameworkRestriction.Exactly r ->
- if r.ToString().StartsWith("net") then
+ if r.ToString().StartsWith("net") || r.ToString().StartsWith("dnx") then
yield r,packages |> Seq.map (fun (n,v,_) -> n,v) |> Seq.toList
| _ -> () ]
|> List.sortBy fst
diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj
index 08f0995030..2ed8239e98 100644
--- a/src/Paket/Paket.fsproj
+++ b/src/Paket/Paket.fsproj
@@ -48,9 +48,8 @@
3
-
-
- D:\code\paket-866\tst
+ update --hard -f
+ D:\code\paket-dependencies
11
diff --git a/tests/Paket.Tests/Nuspec/Microsoft.Framework.Logging.nuspec b/tests/Paket.Tests/Nuspec/Microsoft.Framework.Logging.nuspec
new file mode 100644
index 0000000000..b6176f94dd
--- /dev/null
+++ b/tests/Paket.Tests/Nuspec/Microsoft.Framework.Logging.nuspec
@@ -0,0 +1,57 @@
+
+
+
+ Microsoft.Framework.Logging
+ 1.0.0-beta4
+ Microsoft
+ Microsoft
+ true
+ Logging infrastructure.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm
+ http://go.microsoft.com/fwlink/?LinkID=288859
+ Copyright © Microsoft Corporation
+ http://www.asp.net/
+
+
\ No newline at end of file
diff --git a/tests/Paket.Tests/Nuspec/NuspecSpecs.fs b/tests/Paket.Tests/Nuspec/NuspecSpecs.fs
index 7d790b90fe..7d61a28fdc 100644
--- a/tests/Paket.Tests/Nuspec/NuspecSpecs.fs
+++ b/tests/Paket.Tests/Nuspec/NuspecSpecs.fs
@@ -192,3 +192,20 @@ let ``can detect explicit dependencies for WindowsAzure.Storage``() =
DependenciesFileParser.parseVersionRequirement(">= 5.0.8"),
[FrameworkRestriction.Exactly(WindowsPhoneSilverlight("v8.0"))
FrameworkRestriction.AtLeast(DotNetFramework(FrameworkVersion.V4_Client))])
+
+[]
+let ``can detect framework assemblies for Microsoft.Framework.Logging``() =
+ let nuspec = Nuspec.Load("Nuspec/Microsoft.Framework.Logging.nuspec")
+ nuspec.FrameworkAssemblyReferences.[0].AssemblyName |> shouldEqual "System.Collections.Concurrent"
+ nuspec.FrameworkAssemblyReferences.[0].FrameworkRestrictions
+ |> shouldEqual
+ [FrameworkRestriction.Exactly(DotNetFramework(FrameworkVersion.V4_5))
+ FrameworkRestriction.Exactly(DNX(FrameworkVersion.V4_5_1))]
+
+ let name,_,restrictions = nuspec.Dependencies.[0]
+ name |> shouldEqual (PackageName "Microsoft.Framework.DependencyInjection.Interfaces")
+ restrictions|> shouldEqual []
+
+ let name,_,restrictions = nuspec.Dependencies.[2]
+ name |> shouldEqual (PackageName "System.Collections.Concurrent")
+ restrictions |> shouldEqual [FrameworkRestriction.Exactly(DNXCore(FrameworkVersion.V5_0))]
\ No newline at end of file
diff --git a/tests/Paket.Tests/Paket.Tests.fsproj b/tests/Paket.Tests/Paket.Tests.fsproj
index 11af0dd30d..92e8230aff 100644
--- a/tests/Paket.Tests/Paket.Tests.fsproj
+++ b/tests/Paket.Tests/Paket.Tests.fsproj
@@ -127,6 +127,9 @@
Always
+
+ Always
+
Always