Transition to netstandard.

- dotnet5.X => netstandard1.y (where y = x-1).
- DNXCore50 => netstandardapp1.5.
- Applied the same changes to ifdefs.
This commit is contained in:
N. Taylor Mullen 2016-03-01 13:36:06 -08:00
parent c7f64d34bb
commit c33b422d7a
11 changed files with 85 additions and 53 deletions

View File

@ -15,12 +15,17 @@
"emitEntryPoint": true
},
"frameworks": {
"dnx451": { },
"dnxcore50": {
"dnx451": {},
"netstandardapp1.5": {
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}
},
"imports": [
"dnxcore50"
]
}
},
"content": [ "hosting.json" ]
}
"content": [
"hosting.json"
]
}

View File

@ -17,13 +17,18 @@
"emitEntryPoint": true
},
"frameworks": {
"dnx451": { },
"dnxcore50": {
"dnx451": {},
"netstandardapp1.5": {
"dependencies": {
"NETStandard.Library": "1.0.0-*",
"System.Console": "4.0.0-*"
}
},
"imports": [
"dnxcore50"
]
}
},
"content": [ "hosting.json" ]
}
"content": [
"hosting.json"
]
}

View File

@ -71,7 +71,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https
X509Certificate2 certificate2 = certificate as X509Certificate2;
if (certificate2 == null)
{
#if DOTNET5_4
#if NETSTANDARD1_3
// conversion X509Certificate to X509Certificate2 not supported
// https://github.com/dotnet/corefx/issues/4510
return false;

View File

@ -2,7 +2,9 @@
"version": "1.0.0-*",
"compilationOptions": {
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"description": "Adds HTTPS support to Kestrel",
@ -14,12 +16,15 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*"
},
"frameworks": {
"net451": { },
"dotnet5.4": {
"net451": {},
"netstandard1.3": {
"dependencies": {
"System.Net.Security": "4.0.0-*"
},
"imports": "portable-net45+win8"
"imports": [
"dotnet5.4",
"portable-net45+win8"
]
}
}
}
}

View File

@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Infrastructure
{
public static class TaskUtilities
{
#if DOTNET5_4
#if NETSTANDARD1_3
public static Task CompletedTask = Task.CompletedTask;
#else
public static Task CompletedTask = Task.FromResult<object>(null);
@ -17,7 +17,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Infrastructure
public static Task GetCancelledTask(CancellationToken cancellationToken)
{
#if DOTNET5_4
#if NETSTANDARD1_3
return Task.FromCanceled(cancellationToken);
#else
var tcs = new TaskCompletionSource<object>();

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Networking
{
static PlatformApis()
{
#if DOTNET5_4
#if NETSTANDARD1_3
IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
IsDarwin = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
#else

View File

@ -8,7 +8,7 @@
"dependencies": {
"System.Buffers": "4.0.0-*",
"System.Numerics.Vectors": "4.1.1-*",
"System.Threading.Tasks.Extensions": "4.0.0-*",
"System.Threading.Tasks.Extensions": "4.0.0-*",
"Microsoft.AspNetCore.Hosting": "1.0.0-*",
"Microsoft.Extensions.Logging.Abstractions": "1.0.0-*",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
@ -27,7 +27,7 @@
"System.Threading.Tasks": ""
}
},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.Collections": "4.0.11-*",
"System.Diagnostics.Debug": "4.0.11-*",
@ -46,13 +46,18 @@
"System.Threading.ThreadPool": "4.0.10-*",
"System.Threading.Timer": "4.0.1-*"
},
"imports": "portable-net45+win8"
"imports": [
"dotnet5.4",
"portable-net45+win8"
]
}
},
"compilationOptions": {
"allowUnsafe": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"packInclude": {
@ -62,4 +67,4 @@
"runtimes/win7-arm/native/": "runtimes/win7-arm/native/*",
"runtimes/osx/native/": "runtimes/osx/native/*"
}
}
}

View File

@ -16,12 +16,15 @@
}
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*",
"System.Net.Http": "4.0.1-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"dependencies": {

View File

@ -16,7 +16,7 @@
}
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"System.Diagnostics.TraceSource": "4.0.0-*",
"System.Globalization.Extensions": "4.0.1-*",
@ -27,7 +27,10 @@
"System.Runtime.Handles": "4.0.1-*",
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"dependencies": {

View File

@ -1,24 +1,27 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNetCore.Http.Features": "1.0.0-*",
"Microsoft.AspNetCore.Hosting": "1.0.0-*"
},
"frameworks": {
"netstandardapp1.5": {
"dependencies": {
"NETStandard.Library": "1.0.0-*"
},
"imports": [
"dnxcore50"
]
},
"dependencies": {
"Microsoft.AspNetCore.Http.Features": "1.0.0-*",
"Microsoft.AspNetCore.Hosting": "1.0.0-*"
},
"frameworks": {
"dnxcore50": {
"dependencies": {
"NETStandard.Library": "1.0.0-*"
}
},
"dnx451": {
"frameworkAssemblies": {
"System.Runtime": "",
"System.Text.Encoding": "",
"System.Threading.Tasks": ""
}
}
"dnx451": {
"frameworkAssemblies": {
"System.Runtime": "",
"System.Text.Encoding": "",
"System.Threading.Tasks": ""
}
}
}
}
}

View File

@ -8,12 +8,15 @@
"Newtonsoft.Json": "8.0.2"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"NETStandard.Library": "1.0.0-*",
"System.Dynamic.Runtime": "4.0.11-*"
}
},
"imports": [
"dnxcore50"
]
},
"dnx451": { }
"dnx451": {}
}
}
}