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:31:53 -08:00
parent be651d01d1
commit 9f499d7962
20 changed files with 107 additions and 50 deletions

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -26,7 +28,7 @@
"System.Runtime": ""
}
},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.ComponentModel": "4.0.1-*",
"System.Globalization.Extensions": "4.0.1-*",
@ -35,7 +37,10 @@
"System.Reflection.TypeExtensions": "4.1.0-*",
"System.Runtime.InteropServices": "4.1.0-*",
"System.Security.Cryptography.X509Certificates": "4.0.0-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -19,10 +21,13 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.IO.FileSystem": "4.0.1-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -16,7 +18,7 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.Collections": "4.0.11-*",
"System.Linq": "4.1.0-*",
@ -26,7 +28,10 @@
"System.Security.Claims": "4.0.1-*",
"System.Security.Cryptography.X509Certificates": "4.0.0-*",
"System.Security.Principal": "4.0.1-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}
}

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Http.Internal
public class FormCollection : IFormCollection
{
public static readonly FormCollection Empty = new FormCollection();
#if DOTNET5_4
#if NETSTANDARD1_3
private static readonly string[] EmptyKeys = Array.Empty<string>();
private static readonly StringValues[] EmptyValues = Array.Empty<StringValues>();
#else

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Http.Internal
/// </summary>
public class HeaderDictionary : IHeaderDictionary
{
#if DOTNET5_4
#if NETSTANDARD1_3
private static readonly string[] EmptyKeys = Array.Empty<string>();
private static readonly StringValues[] EmptyValues = Array.Empty<StringValues>();
#else

View File

@ -5,7 +5,7 @@ using System;
#if NET451
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting;
#elif DOTNET5_4
#elif NETSTANDARD1_3
using System.Threading;
#endif
@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Http.Internal
}
}
#elif DOTNET5_4
#elif NETSTANDARD1_3
private AsyncLocal<HttpContext> _httpContextCurrent = new AsyncLocal<HttpContext>();
public HttpContext HttpContext
{

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Http.Internal
public class QueryCollection : IQueryCollection
{
public static readonly QueryCollection Empty = new QueryCollection();
#if DOTNET5_4
#if NETSTANDARD1_3
private static readonly string[] EmptyKeys = Array.Empty<string>();
private static readonly StringValues[] EmptyValues = Array.Empty<StringValues>();
#else

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Http.Internal
public class RequestCookieCollection : IRequestCookieCollection
{
public static readonly RequestCookieCollection Empty = new RequestCookieCollection();
#if DOTNET5_4
#if NETSTANDARD1_3
private static readonly string[] EmptyKeys = Array.Empty<string>();
#else
private static readonly string[] EmptyKeys = new string[0];

View File

@ -9,7 +9,9 @@
"warningsAsErrors": true,
"allowUnsafe": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -19,10 +21,13 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.Threading": "4.0.11-*"
}
"System.Threading": "4.0.11-*"
},
"imports": [
"dotnet5.4"
]
}
}
}
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -16,6 +18,10 @@
},
"frameworks": {
"net451": {},
"dotnet5.4": {}
"netstandard1.3": {
"imports": [
"dotnet5.4"
]
}
}
}
}

View File

@ -8,7 +8,9 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {
@ -22,12 +24,15 @@
"System.Runtime": ""
}
},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.Collections": "4.0.11-*",
"System.IO": "4.1.0-*",
"System.IO.FileSystem": "4.0.1-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}
}

View File

@ -8,13 +8,15 @@
"compilationOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"nowarn": [
"CS1591"
],
"xmlDoc": true
},
"dependencies": {},
"frameworks": {
"net451": {},
"dotnet5.4": {
"netstandard1.3": {
"dependencies": {
"System.Collections": "4.0.11-*",
"System.Diagnostics.Contracts": "4.0.1-*",
@ -23,7 +25,10 @@
"System.Linq": "4.1.0-*",
"System.Text.Encoding": "4.0.11-*",
"System.Resources.ResourceManager": "4.0.1-*"
}
},
"imports": [
"dotnet5.4"
]
}
}
}
}

View File

@ -10,11 +10,14 @@
"xunit": "2.1.0"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"frameworkAssemblies": {

View File

@ -7,11 +7,14 @@
"xunit": "2.1.0"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"frameworkAssemblies": {

View File

@ -5,11 +5,14 @@
"xunit": "2.1.0"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"frameworkAssemblies": {

View File

@ -5,11 +5,14 @@
"xunit": "2.1.0"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"frameworkAssemblies": {

View File

@ -7,11 +7,14 @@
"xunit": "2.1.0"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"frameworkAssemblies": {

View File

@ -312,7 +312,7 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
[Theory]
[InlineData("你好世界", "utf-16")]
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
// CoreCLR does not like shift_jis as an encoding.
[InlineData("こんにちは世界", "shift_jis")]
#endif
@ -343,7 +343,7 @@ namespace Microsoft.AspNetCore.WebUtilities.Test
[InlineData('你', 1023, "utf-16")]
[InlineData('你', 1024, "utf-16")]
[InlineData('你', 1050, "utf-16")]
#if !DNXCORE50
#if !NETSTANDARDAPP1_5
// CoreCLR does not like shift_jis as an encoding.
[InlineData('こ', 1023, "shift_jis")]
[InlineData('こ', 1024, "shift_jis")]

View File

@ -9,12 +9,15 @@
},
"testRunner": "xunit",
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"System.Text.Encoding.Extensions": "4.0.11-*",
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"frameworkAssemblies": {

View File

@ -6,11 +6,14 @@
"xunit": "2.1.0"
},
"frameworks": {
"dnxcore50": {
"netstandardapp1.5": {
"dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*"
},
"imports": "portable-net451+win8"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
},
"net451": {
"frameworkAssemblies": {