-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .NET Standard 2.1 support #3530
Changes from 4 commits
470f66a
8648231
655707d
a71ea67
742f550
7809c64
e7be471
ed038bc
f5689e0
0a23d45
216015f
8b4fbca
dc84446
377994b
7b939eb
f66564a
5e57ef4
3bbcb3f
38918f0
52b21d6
b68a351
9c9b032
3635394
65c0703
2e35f92
edfd7a4
3079ff4
0ef5d93
b58d5cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ type DotNetStandardVersion = | |
| V1_5 | ||
| V1_6 | ||
| V2_0 | ||
| V2_1 | ||
override this.ToString() = | ||
match this with | ||
| V1_0 -> "v1.0" | ||
|
@@ -28,6 +29,7 @@ type DotNetStandardVersion = | |
| V1_5 -> "v1.5" | ||
| V1_6 -> "v1.6" | ||
| V2_0 -> "v2.0" | ||
| V2_1 -> "v2.1" | ||
member this.ShortString() = | ||
match this with | ||
| DotNetStandardVersion.V1_0 -> "1.0" | ||
|
@@ -38,17 +40,21 @@ type DotNetStandardVersion = | |
| DotNetStandardVersion.V1_5 -> "1.5" | ||
| DotNetStandardVersion.V1_6 -> "1.6" | ||
| DotNetStandardVersion.V2_0 -> "2.0" | ||
| DotNetStandardVersion.V2_1 -> "2.1" | ||
static member TryParse s = | ||
match s with | ||
| "" | "1" -> Some(DotNetStandardVersion.V1_0) | ||
| "" | ||
| "1" -> Some(DotNetStandardVersion.V1_0) | ||
| "1.1" -> Some(DotNetStandardVersion.V1_1) | ||
| "1.2" -> Some(DotNetStandardVersion.V1_2) | ||
| "1.3" -> Some(DotNetStandardVersion.V1_3) | ||
| "1.4" -> Some(DotNetStandardVersion.V1_4) | ||
| "1.5" -> Some(DotNetStandardVersion.V1_5) | ||
| "1.6" -> Some(DotNetStandardVersion.V1_6) | ||
| "2" -> Some(DotNetStandardVersion.V2_0) | ||
| "2" -> Some(DotNetStandardVersion.V2_0) | ||
| "2.1" -> Some(DotNetStandardVersion.V2_1) | ||
| _ -> None | ||
|
||
[<RequireQualifiedAccess>] | ||
/// The Framework version. | ||
// Each time a new version is added NuGetPackageCache.CurrentCacheVersion should be bumped. | ||
|
@@ -71,7 +77,7 @@ type FrameworkVersion = | |
| V4_7 | ||
| V4_7_1 | ||
| V4_7_2 | ||
| V5_0 | ||
| V4_8 | ||
override this.ToString() = | ||
match this with | ||
| V1 -> "v1.0" | ||
|
@@ -92,7 +98,7 @@ type FrameworkVersion = | |
| V4_7 -> "v4.7" | ||
| V4_7_1 -> "v4.7.1" | ||
| V4_7_2 -> "v4.7.2" | ||
| V5_0 -> "v5.0" | ||
| V4_8 -> "v4.8" | ||
|
||
member this.ShortString() = | ||
match this with | ||
|
@@ -114,7 +120,7 @@ type FrameworkVersion = | |
| FrameworkVersion.V4_7 -> "47" | ||
| FrameworkVersion.V4_7_1 -> "471" | ||
| FrameworkVersion.V4_7_2 -> "472" | ||
| FrameworkVersion.V5_0 -> "50" | ||
| FrameworkVersion.V4_8 -> "48" | ||
|
||
static member TryParse s = | ||
match s with | ||
|
@@ -136,7 +142,7 @@ type FrameworkVersion = | |
| "4.7" -> Some FrameworkVersion.V4_7 | ||
| "4.7.1" -> Some FrameworkVersion.V4_7_1 | ||
| "4.7.2" -> Some FrameworkVersion.V4_7_2 | ||
| "5" -> Some FrameworkVersion.V5_0 | ||
| "4.8" -> Some FrameworkVersion.V4_8 | ||
| _ -> None | ||
|
||
[<RequireQualifiedAccess>] | ||
|
@@ -509,8 +515,6 @@ type TizenVersion = | |
type FrameworkIdentifier = | ||
| DotNetFramework of FrameworkVersion | ||
| UAP of UAPVersion | ||
| DNX of FrameworkVersion | ||
| DNXCore of FrameworkVersion | ||
| DotNetStandard of DotNetStandardVersion | ||
| DotNetCoreApp of DotNetCoreAppVersion | ||
| DotNetUnity of DotNetUnityVersion | ||
|
@@ -531,8 +535,6 @@ type FrameworkIdentifier = | |
override x.ToString() = | ||
match x with | ||
| DotNetFramework v -> "net" + v.ShortString() | ||
| DNX v -> "dnx" + v.ShortString() | ||
| DNXCore v -> "dnxcore" + v.ShortString() | ||
| DotNetStandard v -> "netstandard" + v.ShortString() | ||
| DotNetCoreApp v -> "netcoreapp" + v.ShortString() | ||
| DotNetUnity v -> "net" + v.ShortString() | ||
|
@@ -623,9 +625,7 @@ type FrameworkIdentifier = | |
| DotNetFramework FrameworkVersion.V4_7 -> [ DotNetFramework FrameworkVersion.V4_6_3] | ||
| DotNetFramework FrameworkVersion.V4_7_1 -> [ DotNetFramework FrameworkVersion.V4_7; DotNetStandard DotNetStandardVersion.V2_0 ] | ||
| DotNetFramework FrameworkVersion.V4_7_2 -> [ DotNetFramework FrameworkVersion.V4_7_1 ] | ||
| DotNetFramework FrameworkVersion.V5_0 -> [ DotNetFramework FrameworkVersion.V4_7_2 ] | ||
| DNX _ -> [ ] | ||
| DNXCore _ -> [ ] | ||
| DotNetFramework FrameworkVersion.V4_8 -> [ DotNetFramework FrameworkVersion.V4_7_2 ] | ||
| DotNetStandard DotNetStandardVersion.V1_0 -> [ ] | ||
| DotNetStandard DotNetStandardVersion.V1_1 -> [ DotNetStandard DotNetStandardVersion.V1_0 ] | ||
| DotNetStandard DotNetStandardVersion.V1_2 -> [ DotNetStandard DotNetStandardVersion.V1_1 ] | ||
|
@@ -634,12 +634,13 @@ type FrameworkIdentifier = | |
| DotNetStandard DotNetStandardVersion.V1_5 -> [ DotNetStandard DotNetStandardVersion.V1_4 ] | ||
| DotNetStandard DotNetStandardVersion.V1_6 -> [ DotNetStandard DotNetStandardVersion.V1_5 ] | ||
| DotNetStandard DotNetStandardVersion.V2_0 -> [ DotNetStandard DotNetStandardVersion.V1_6 ] | ||
| DotNetStandard DotNetStandardVersion.V2_1 -> [ DotNetStandard DotNetStandardVersion.V2_0 ] | ||
| 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.V2_0 ] | ||
| DotNetCoreApp DotNetCoreAppVersion.V2_2 -> [ DotNetCoreApp DotNetCoreAppVersion.V2_1 ] | ||
| DotNetCoreApp DotNetCoreAppVersion.V3_0 -> [ DotNetCoreApp DotNetCoreAppVersion.V2_2 ] | ||
| DotNetCoreApp DotNetCoreAppVersion.V3_0 -> [ DotNetCoreApp DotNetCoreAppVersion.V2_2; DotNetStandard DotNetStandardVersion.V2_1 ] | ||
| DotNetUnity DotNetUnityVersion.V3_5_Full -> [ ] | ||
| DotNetUnity DotNetUnityVersion.V3_5_Subset -> [ ] | ||
| DotNetUnity DotNetUnityVersion.V3_5_Micro -> [ ] | ||
|
@@ -793,10 +794,6 @@ module FrameworkDetection = | |
| "sl4-wp75" | "sl4-wp7.5" -> Some (WindowsPhone WindowsPhoneVersion.V7_5) | ||
| MatchTfms ["wp";"wpv"] (Bind WindowsPhoneVersion.TryParse) fm -> Some (WindowsPhone fm) | ||
| MatchTfms ["wpa";"wpav";"wpapp"] (Bind WindowsPhoneAppVersion.TryParse) fm -> Some (WindowsPhoneApp fm) | ||
| MatchTfm "dnx" (allowVersions ["";"4.5.1"]) () -> Some(DNX FrameworkVersion.V4_5_1) | ||
| MatchTfms ["dnxcore";"netplatform";"netcore";"aspnetcore";"aspnet";"dotnet"] (Bind (allowVersions ["";"5"])) | ||
() -> Some(DNXCore FrameworkVersion.V5_0) | ||
| v when v.StartsWith "dotnet" -> Some(DNXCore FrameworkVersion.V5_0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so we drop support for those monikers and hope no-one uses them? (fine by me just asking) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. those things do not exist. they are completely abandoned. I wanted to drop them long time ago. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NuGet apparently still parses them: http://nugettoolsdev.azurewebsites.net/4.5.0/parse-framework?framework=dnxcore |
||
| MatchTfm "netstandard" DotNetStandardVersion.TryParse fm -> Some (DotNetStandard fm) | ||
// "netcore" is for backwards compat (2017-08-20), we wrote this incorrectly into the lockfile. | ||
| MatchTfms ["netcoreapp";"netcore"] (Bind DotNetCoreAppVersion.TryParse) fm -> Some (DotNetCoreApp fm) | ||
|
@@ -1126,6 +1123,7 @@ module KnownTargetProfiles = | |
FrameworkVersion.V4_7 | ||
FrameworkVersion.V4_7_1 | ||
FrameworkVersion.V4_7_2 | ||
FrameworkVersion.V4_8 | ||
] | ||
|
||
let DotNetFrameworkIdentifiers = | ||
|
@@ -1145,6 +1143,7 @@ module KnownTargetProfiles = | |
DotNetStandardVersion.V1_5 | ||
DotNetStandardVersion.V1_6 | ||
DotNetStandardVersion.V2_0 | ||
DotNetStandardVersion.V2_1 | ||
] | ||
|
||
let DotNetStandardProfiles = | ||
|
@@ -1339,13 +1338,6 @@ module KnownTargetProfiles = | |
AllDotNetProfiles | ||
|> Set.ofList | ||
|
||
let isSupportedProfile profile = | ||
match profile with | ||
| FrameworkIdentifier.DNX _ | ||
| FrameworkIdentifier.DNXCore _ | ||
| FrameworkIdentifier.DotNetFramework (FrameworkVersion.V5_0) -> false | ||
| _ -> true | ||
|
||
let TryFindPortableProfile (name:string) = | ||
let lowerName = name.ToLowerInvariant() | ||
AllProfiles | ||
|
@@ -1466,7 +1458,6 @@ module SupportCalculation = | |
fws | ||
|> List.filter (function | ||
| MonoTouch | ||
| DNXCore _ | ||
| UAP _ | ||
| MonoAndroid _ | ||
| XamariniOS | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cartermp @terrajobst is this correct?
.NET Core 3.0 is compatible to .NET Standard 2.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and what about ..NET 4.8? Is that supposed to be compatible with .NET Standard 2.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from what I read .NET will not be compatible with the 2.1 "standard"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so I will remove that .NET 4.8 -> .NET Standard 2.1 arrow for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.NET Standard 2.1 is only compatible with .NET Core 3.0 at the moment; no plans for compat with .NWT Framework. It will also eventually be supported by Mono.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be funny when that happens