Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/Paket.Core/Versioning/FrameworkHandling.fs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ type FrameworkIdentifier =
| DotNetCoreApp DotNetCoreAppVersion.V1_0 -> [ DotNetStandard DotNetStandardVersion.V1_6 ]
| DotNetCoreApp DotNetCoreAppVersion.V1_1 -> [ DotNetCoreApp DotNetCoreAppVersion.V1_0 ]
| DotNetCoreApp DotNetCoreAppVersion.V2_0 -> [ DotNetCoreApp DotNetCoreAppVersion.V1_1; DotNetStandard DotNetStandardVersion.V2_0 ]
| DotNetCoreApp DotNetCoreAppVersion.V2_1 -> [ DotNetCoreApp DotNetCoreAppVersion.V1_1; DotNetStandard DotNetStandardVersion.V2_0 ]
| DotNetCoreApp DotNetCoreAppVersion.V2_1 -> [ DotNetCoreApp DotNetCoreAppVersion.V2_0; DotNetStandard DotNetStandardVersion.V2_0 ]

@matthid matthid Aug 15, 2018 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can remove netstandard20 version here as netcoreapp2.0 already supports that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, let me add a test netcoreapp2.1+netstandard2.0 and i'll remove it

| DotNetUnity DotNetUnityVersion.V3_5_Full -> [ ]
| DotNetUnity DotNetUnityVersion.V3_5_Subset -> [ ]
| DotNetUnity DotNetUnityVersion.V3_5_Micro -> [ ]
Expand Down
28 changes: 28 additions & 0 deletions tests/Paket.Tests/Versioning/FrameworkCompatibilitySpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,31 @@ let ``net46 should be compatible with netstandard13``() =
(TargetProfile.SinglePlatform (DotNetStandard DotNetStandardVersion.V1_3)).IsSmallerThan (TargetProfile.SinglePlatform (DotNetFramework FrameworkVersion.V4_6))
|> shouldEqual true


[<Test>]
let ``net462 should be compatible with net45``() =
let net45 = TargetProfile.SinglePlatform (DotNetFramework FrameworkVersion.V4_5)
let net462 = TargetProfile.SinglePlatform (DotNetFramework FrameworkVersion.V4_6_2)

net462.IsAtLeast net45
|> shouldEqual true

net45.IsSupportedBy net462
|> shouldEqual true

net45.IsSmallerThan net462
|> shouldEqual true

[<Test>]
let ``netcoreapp2.1 should be compatible with netcoreapp2.0``() =
let ``netcoreapp2.0`` = TargetProfile.SinglePlatform (DotNetCoreApp DotNetCoreAppVersion.V2_0)
let ``netcoreapp2.1`` = TargetProfile.SinglePlatform (DotNetCoreApp DotNetCoreAppVersion.V2_1)

``netcoreapp2.1``.IsAtLeast ``netcoreapp2.0``
|> shouldEqual true

``netcoreapp2.0``.IsSupportedBy ``netcoreapp2.1``
|> shouldEqual true

``netcoreapp2.0``.IsSmallerThan ``netcoreapp2.1``
|> shouldEqual true