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:38:14 -08:00
parent 7ac771155d
commit b746844466
10 changed files with 65 additions and 34 deletions

View File

@ -33,7 +33,7 @@ namespace LocalizationSample
new CultureInfo("zh"), new CultureInfo("zh"),
new CultureInfo("zh-CN") new CultureInfo("zh-CN")
}; };
#if !DNXCORE50 #if !NETSTANDARDAPP1_5
supportedCultures.Add(new CultureInfo("zh-CHT")); supportedCultures.Add(new CultureInfo("zh-CHT"));
#endif #endif
var options = new RequestLocalizationOptions { var options = new RequestLocalizationOptions {

View File

@ -1,6 +1,5 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"dependencies": { "dependencies": {
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
"Microsoft.AspNetCore.Localization": "1.0.0-*", "Microsoft.AspNetCore.Localization": "1.0.0-*",
@ -8,24 +7,23 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.NETCore.Platforms": "1.0.1-*" "Microsoft.NETCore.Platforms": "1.0.1-*"
}, },
"compilationOptions": { "compilationOptions": {
"emitEntryPoint": true "emitEntryPoint": true
}, },
"commands": { "commands": {
"web": "LocalizationSample" "web": "LocalizationSample"
}, },
"frameworks": { "frameworks": {
"dnx451": { }, "dnx451": {},
"dnxcore50": { "netstandardapp1.5": {
"dependencies": { "dependencies": {
"NETStandard.Library": "1.0.0-*" "NETStandard.Library": "1.0.0-*"
} },
"imports": [
"dnxcore50"
]
} }
}, },
"publishExclude": [ "publishExclude": [
"node_modules", "node_modules",
"bower_components", "bower_components",
@ -38,4 +36,4 @@
"node_modules", "node_modules",
"bower_components" "bower_components"
] ]
} }

View File

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

View File

@ -8,16 +8,21 @@
"compilationOptions": { "compilationOptions": {
"warningsAsErrors": true, "warningsAsErrors": true,
"keyFile": "../../tools/Key.snk", "keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ], "nowarn": [
"CS1591"
],
"xmlDoc": true "xmlDoc": true
}, },
"frameworks": { "frameworks": {
"net451": {}, "net451": {},
"dotnet5.4": { "netstandard1.3": {
"dependencies": { "dependencies": {
"System.Collections.Concurrent": "4.0.12-*", "System.Collections.Concurrent": "4.0.12-*",
"System.Linq": "4.1.0-*" "System.Linq": "4.1.0-*"
} },
"imports": [
"dotnet5.4"
]
} }
} }
} }

View File

@ -8,16 +8,21 @@
"compilationOptions": { "compilationOptions": {
"warningsAsErrors": true, "warningsAsErrors": true,
"keyFile": "../../tools/Key.snk", "keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ], "nowarn": [
"CS1591"
],
"xmlDoc": true "xmlDoc": true
}, },
"frameworks": { "frameworks": {
"net451": {}, "net451": {},
"dotnet5.4": { "netstandard1.3": {
"dependencies": { "dependencies": {
"Microsoft.CSharp": "4.0.1-*", "Microsoft.CSharp": "4.0.1-*",
"System.Globalization": "4.0.11-*" "System.Globalization": "4.0.11-*"
} },
"imports": [
"dotnet5.4"
]
} }
} }
} }

View File

@ -8,7 +8,9 @@
"compilationOptions": { "compilationOptions": {
"warningsAsErrors": true, "warningsAsErrors": true,
"keyFile": "../../tools/Key.snk", "keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ], "nowarn": [
"CS1591"
],
"xmlDoc": true "xmlDoc": true
}, },
"dependencies": { "dependencies": {
@ -19,11 +21,14 @@
}, },
"frameworks": { "frameworks": {
"net451": {}, "net451": {},
"dotnet5.4": { "netstandard1.3": {
"dependencies": { "dependencies": {
"System.Collections.Concurrent": "4.0.12-*", "System.Collections.Concurrent": "4.0.12-*",
"System.Resources.Reader": "4.0.0-*" "System.Resources.Reader": "4.0.0-*"
} },
"imports": [
"dotnet5.4"
]
} }
} }
} }

View File

@ -12,11 +12,14 @@
"Microsoft.NETCore.Platforms": "1.0.1-*" "Microsoft.NETCore.Platforms": "1.0.1-*"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { "netstandardapp1.5": {
"dependencies": { "dependencies": {
"dotnet-test-xunit": "1.0.0-dev-*" "dotnet-test-xunit": "1.0.0-dev-*"
}, },
"imports": "portable-net451+win8" "imports": [
"dnxcore50",
"portable-net451+win8"
]
}, },
"dnx451": {} "dnx451": {}
}, },

View File

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

View File

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

View File

@ -7,11 +7,14 @@
"Microsoft.Extensions.DependencyInjection": "1.0.0-*", "Microsoft.Extensions.DependencyInjection": "1.0.0-*",
"Microsoft.Extensions.Localization": "1.0.0-*", "Microsoft.Extensions.Localization": "1.0.0-*",
"Microsoft.NETCore.Platforms": "1.0.1-*", "Microsoft.NETCore.Platforms": "1.0.1-*",
"xunit": "2.1.0-*", "xunit": "2.1.0-*"
}, },
"frameworks": { "frameworks": {
"dnxcore50": { "netstandardapp1.5": {
"imports": "portable-net451+win8", "imports": [
"dnxcore50",
"portable-net451+win8"
],
"dependencies": { "dependencies": {
"moq.netcore": "4.4.0-beta8", "moq.netcore": "4.4.0-beta8",
"System.Resources.Writer": "4.0.0-*", "System.Resources.Writer": "4.0.0-*",