From f38c01724377369514d6c3cff57d8c27346ecb8e Mon Sep 17 00:00:00 2001 From: Jon Steinich Date: Wed, 21 Mar 2018 11:50:43 -0500 Subject: [PATCH 1/3] update projects to multi-target netstandard2.0/netcoreapp2.0 update Microsoft.Extensions.Logging to 2.0.0 for netstandard2.0 target update dotnet sdk to 2.0.3 to support building netstandard2.0 --- build.cake | 6 ++++-- build.ps1 | 4 ++-- examples/Discard.Client/Discard.Client.csproj | 2 +- examples/Discard.Server/Discard.Server.csproj | 2 +- examples/Echo.Client/Echo.Client.csproj | 2 +- examples/Echo.Server/Echo.Server.csproj | 2 +- examples/Examples.Common/Examples.Common.csproj | 9 +++++++-- examples/Factorial.Client/Factorial.Client.csproj | 2 +- examples/Factorial.Server/Factorial.Server.csproj | 2 +- examples/Factorial/Factorial.csproj | 2 +- .../QuoteOfTheMoment.Client.csproj | 2 +- .../QuoteOfTheMoment.Server.csproj | 2 +- examples/SecureChat.Client/SecureChat.Client.csproj | 2 +- examples/SecureChat.Server/SecureChat.Server.csproj | 2 +- examples/Telnet.Client/Telnet.Client.csproj | 2 +- examples/Telnet.Server/Telnet.Server.csproj | 2 +- src/DotNetty.Buffers/DotNetty.Buffers.csproj | 4 ++-- .../DotNetty.Codecs.Mqtt.csproj | 4 ++-- .../DotNetty.Codecs.Protobuf.csproj | 4 ++-- .../DotNetty.Codecs.ProtocolBuffers.csproj | 7 ++++--- .../DotNetty.Codecs.Redis.csproj | 4 ++-- src/DotNetty.Codecs/DotNetty.Codecs.csproj | 4 ++-- src/DotNetty.Common/DotNetty.Common.csproj | 13 +++++++++---- src/DotNetty.Handlers/DotNetty.Handlers.csproj | 4 ++-- .../DotNetty.Transport.Libuv.csproj | 6 +++--- src/DotNetty.Transport/DotNetty.Transport.csproj | 4 ++-- .../DotNetty.Buffers.Tests.csproj | 9 +++++++-- .../DotNetty.Codecs.Mqtt.Tests.csproj | 9 +++++++-- .../DotNetty.Codecs.Protobuf.Tests.csproj | 9 +++++++-- .../DotNetty.Codecs.ProtocolBuffers.Tests.csproj | 10 ++++++++-- .../DotNetty.Codecs.Redis.Tests.csproj | 9 +++++++-- .../DotNetty.Codecs.Tests.csproj | 9 +++++++-- .../DotNetty.Common.Tests.csproj | 9 +++++++-- .../DotNetty.Handlers.Tests.csproj | 9 +++++++-- test/DotNetty.Microbench/DotNetty.Microbench.csproj | 2 +- .../DotNetty.Tests.Common.csproj | 9 +++++++-- .../DotNetty.Tests.End2End.csproj | 9 +++++++-- .../DotNetty.Transport.Libuv.Tests.csproj | 9 +++++++-- .../DotNetty.Transport.Tests.csproj | 9 +++++++-- 39 files changed, 142 insertions(+), 68 deletions(-) diff --git a/build.cake b/build.cake index fdf8059e9..7427a7791 100644 --- a/build.cake +++ b/build.cake @@ -23,7 +23,8 @@ var nuget = Directory(".nuget"); var output = Directory("build"); var outputBinaries = output + Directory("binaries"); var outputBinariesNet45 = outputBinaries + Directory("net45"); -var outputBinariesNetstandard = outputBinaries + Directory("netstandard1.3"); +var outputBinariesNetstandard13 = outputBinaries + Directory("netstandard1.3"); +var outputBinariesNetstandard20 = outputBinaries + Directory("netstandard2.0"); var outputPackages = output + Directory("packages"); var outputNuGet = output + Directory("nuget"); var outputPerfResults = Directory("perfResults"); @@ -36,7 +37,8 @@ Task("Clean") // Clean artifact directories. CleanDirectories(new DirectoryPath[] { output, outputBinaries, outputPackages, outputNuGet, - outputBinariesNet45, outputBinariesNetstandard + outputBinariesNet45, outputBinariesNetstandard13, + outputBinariesNetstandard20 }); if(!skipClean) { diff --git a/build.ps1 b/build.ps1 index 7bc2068b5..c141451f0 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,6 @@ $CakeVersion = "0.17.0" -$DotNetVersion = "1.0.1"; -$DotNetInstallerUri = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.1/scripts/obtain/dotnet-install.ps1"; +$DotNetVersion = "2.0.3"; +$DotNetInstallerUri = "https://raw.githubusercontent.com/dotnet/cli/rel/2.0.3/scripts/obtain/dotnet-install.ps1"; # Make sure tools folder exists $PSScriptRoot = $pwd diff --git a/examples/Discard.Client/Discard.Client.csproj b/examples/Discard.Client/Discard.Client.csproj index e30274916..915ee5926 100644 --- a/examples/Discard.Client/Discard.Client.csproj +++ b/examples/Discard.Client/Discard.Client.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Discard.Server/Discard.Server.csproj b/examples/Discard.Server/Discard.Server.csproj index e30274916..915ee5926 100644 --- a/examples/Discard.Server/Discard.Server.csproj +++ b/examples/Discard.Server/Discard.Server.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Echo.Client/Echo.Client.csproj b/examples/Echo.Client/Echo.Client.csproj index e30274916..915ee5926 100644 --- a/examples/Echo.Client/Echo.Client.csproj +++ b/examples/Echo.Client/Echo.Client.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Echo.Server/Echo.Server.csproj b/examples/Echo.Server/Echo.Server.csproj index 46139ef41..72799f202 100644 --- a/examples/Echo.Server/Echo.Server.csproj +++ b/examples/Echo.Server/Echo.Server.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Examples.Common/Examples.Common.csproj b/examples/Examples.Common/Examples.Common.csproj index 6c6288b95..8a50ef7d9 100644 --- a/examples/Examples.Common/Examples.Common.csproj +++ b/examples/Examples.Common/Examples.Common.csproj @@ -1,14 +1,19 @@  - netstandard1.3;net451 + netcoreapp2.0;netstandard1.3;net451 1.6.1 false + + + + + + - diff --git a/examples/Factorial.Client/Factorial.Client.csproj b/examples/Factorial.Client/Factorial.Client.csproj index b20b32b2c..717d7083d 100644 --- a/examples/Factorial.Client/Factorial.Client.csproj +++ b/examples/Factorial.Client/Factorial.Client.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Factorial.Server/Factorial.Server.csproj b/examples/Factorial.Server/Factorial.Server.csproj index b20b32b2c..717d7083d 100644 --- a/examples/Factorial.Server/Factorial.Server.csproj +++ b/examples/Factorial.Server/Factorial.Server.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Factorial/Factorial.csproj b/examples/Factorial/Factorial.csproj index 06ad6a0d6..51a122cf0 100644 --- a/examples/Factorial/Factorial.csproj +++ b/examples/Factorial/Factorial.csproj @@ -1,6 +1,6 @@  - netstandard1.3;net451 + netcoreapp2.0;netstandard1.3;net451 1.6.1 false diff --git a/examples/QuoteOfTheMoment.Client/QuoteOfTheMoment.Client.csproj b/examples/QuoteOfTheMoment.Client/QuoteOfTheMoment.Client.csproj index e30274916..915ee5926 100644 --- a/examples/QuoteOfTheMoment.Client/QuoteOfTheMoment.Client.csproj +++ b/examples/QuoteOfTheMoment.Client/QuoteOfTheMoment.Client.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/QuoteOfTheMoment.Server/QuoteOfTheMoment.Server.csproj b/examples/QuoteOfTheMoment.Server/QuoteOfTheMoment.Server.csproj index e30274916..915ee5926 100644 --- a/examples/QuoteOfTheMoment.Server/QuoteOfTheMoment.Server.csproj +++ b/examples/QuoteOfTheMoment.Server/QuoteOfTheMoment.Server.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/SecureChat.Client/SecureChat.Client.csproj b/examples/SecureChat.Client/SecureChat.Client.csproj index e30274916..915ee5926 100644 --- a/examples/SecureChat.Client/SecureChat.Client.csproj +++ b/examples/SecureChat.Client/SecureChat.Client.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/SecureChat.Server/SecureChat.Server.csproj b/examples/SecureChat.Server/SecureChat.Server.csproj index e30274916..915ee5926 100644 --- a/examples/SecureChat.Server/SecureChat.Server.csproj +++ b/examples/SecureChat.Server/SecureChat.Server.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Telnet.Client/Telnet.Client.csproj b/examples/Telnet.Client/Telnet.Client.csproj index e30274916..915ee5926 100644 --- a/examples/Telnet.Client/Telnet.Client.csproj +++ b/examples/Telnet.Client/Telnet.Client.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/examples/Telnet.Server/Telnet.Server.csproj b/examples/Telnet.Server/Telnet.Server.csproj index e30274916..915ee5926 100644 --- a/examples/Telnet.Server/Telnet.Server.csproj +++ b/examples/Telnet.Server/Telnet.Server.csproj @@ -1,7 +1,7 @@  Exe - netcoreapp1.1;net451 + netcoreapp2.0;netcoreapp1.1;net451 1.6.1 false diff --git a/src/DotNetty.Buffers/DotNetty.Buffers.csproj b/src/DotNetty.Buffers/DotNetty.Buffers.csproj index aef168352..647491179 100644 --- a/src/DotNetty.Buffers/DotNetty.Buffers.csproj +++ b/src/DotNetty.Buffers/DotNetty.Buffers.csproj @@ -1,6 +1,6 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true Buffer management in DotNetty Copyright © Microsoft Corporation @@ -32,7 +32,7 @@ - + diff --git a/src/DotNetty.Codecs.Mqtt/DotNetty.Codecs.Mqtt.csproj b/src/DotNetty.Codecs.Mqtt/DotNetty.Codecs.Mqtt.csproj index 836e34cb7..9d5dc2003 100644 --- a/src/DotNetty.Codecs.Mqtt/DotNetty.Codecs.Mqtt.csproj +++ b/src/DotNetty.Codecs.Mqtt/DotNetty.Codecs.Mqtt.csproj @@ -1,6 +1,6 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Codecs.Mqtt MQTT codec for DotNetty @@ -32,7 +32,7 @@ - + diff --git a/src/DotNetty.Codecs.Protobuf/DotNetty.Codecs.Protobuf.csproj b/src/DotNetty.Codecs.Protobuf/DotNetty.Codecs.Protobuf.csproj index a8e9859e8..4ec92ca0c 100644 --- a/src/DotNetty.Codecs.Protobuf/DotNetty.Codecs.Protobuf.csproj +++ b/src/DotNetty.Codecs.Protobuf/DotNetty.Codecs.Protobuf.csproj @@ -1,6 +1,6 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Codecs.Protobuf Protobuf Proto3 codec for DotNetty @@ -35,7 +35,7 @@ - + diff --git a/src/DotNetty.Codecs.ProtocolBuffers/DotNetty.Codecs.ProtocolBuffers.csproj b/src/DotNetty.Codecs.ProtocolBuffers/DotNetty.Codecs.ProtocolBuffers.csproj index fda88f35a..7427cbbd8 100644 --- a/src/DotNetty.Codecs.ProtocolBuffers/DotNetty.Codecs.ProtocolBuffers.csproj +++ b/src/DotNetty.Codecs.ProtocolBuffers/DotNetty.Codecs.ProtocolBuffers.csproj @@ -1,7 +1,7 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Codecs.ProtocolBuffers ProtocolBuffers Proto2 codec for DotNetty @@ -23,8 +23,9 @@ git https://github.com/Azure/DotNetty/ $(PackageTargetFallback);portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8 1.6.1 - + @@ -37,7 +38,7 @@ - + diff --git a/src/DotNetty.Codecs.Redis/DotNetty.Codecs.Redis.csproj b/src/DotNetty.Codecs.Redis/DotNetty.Codecs.Redis.csproj index b0f676015..a2550d30b 100644 --- a/src/DotNetty.Codecs.Redis/DotNetty.Codecs.Redis.csproj +++ b/src/DotNetty.Codecs.Redis/DotNetty.Codecs.Redis.csproj @@ -1,6 +1,6 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Codecs.Redis Redis codec for DotNetty @@ -32,7 +32,7 @@ - + diff --git a/src/DotNetty.Codecs/DotNetty.Codecs.csproj b/src/DotNetty.Codecs/DotNetty.Codecs.csproj index 1a81cc4fb..b422cf8e6 100644 --- a/src/DotNetty.Codecs/DotNetty.Codecs.csproj +++ b/src/DotNetty.Codecs/DotNetty.Codecs.csproj @@ -1,6 +1,6 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Codecs General purpose codecs for DotNetty @@ -33,7 +33,7 @@ - + diff --git a/src/DotNetty.Common/DotNetty.Common.csproj b/src/DotNetty.Common/DotNetty.Common.csproj index 76862a01d..87213c7be 100644 --- a/src/DotNetty.Common/DotNetty.Common.csproj +++ b/src/DotNetty.Common/DotNetty.Common.csproj @@ -1,7 +1,7 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Common DotNetty common routines @@ -23,19 +23,24 @@ https://github.com/Azure/DotNetty/blob/master/LICENSE.txt git https://github.com/Azure/DotNetty/ - 1.6.1 + 1.6.1 - - + + + + + + + diff --git a/src/DotNetty.Handlers/DotNetty.Handlers.csproj b/src/DotNetty.Handlers/DotNetty.Handlers.csproj index 4665673ae..e70a281e1 100644 --- a/src/DotNetty.Handlers/DotNetty.Handlers.csproj +++ b/src/DotNetty.Handlers/DotNetty.Handlers.csproj @@ -1,7 +1,7 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Handlers Application handlers for DotNetty @@ -33,7 +33,7 @@ - + diff --git a/src/DotNetty.Transport.Libuv/DotNetty.Transport.Libuv.csproj b/src/DotNetty.Transport.Libuv/DotNetty.Transport.Libuv.csproj index fe126e21d..fdecc4c7e 100644 --- a/src/DotNetty.Transport.Libuv/DotNetty.Transport.Libuv.csproj +++ b/src/DotNetty.Transport.Libuv/DotNetty.Transport.Libuv.csproj @@ -1,7 +1,7 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Transport.Libuv.Experimental Libuv transport model in DotNetty @@ -38,8 +38,8 @@ - - + + diff --git a/src/DotNetty.Transport/DotNetty.Transport.csproj b/src/DotNetty.Transport/DotNetty.Transport.csproj index f7d374671..a559c2d03 100644 --- a/src/DotNetty.Transport/DotNetty.Transport.csproj +++ b/src/DotNetty.Transport/DotNetty.Transport.csproj @@ -1,7 +1,7 @@  - netstandard1.3;net45 + netstandard2.0;netstandard1.3;net45 true DotNetty.Transport Transport model in DotNetty @@ -31,7 +31,7 @@ - + diff --git a/test/DotNetty.Buffers.Tests/DotNetty.Buffers.Tests.csproj b/test/DotNetty.Buffers.Tests/DotNetty.Buffers.Tests.csproj index 6986327ee..d06a706ea 100644 --- a/test/DotNetty.Buffers.Tests/DotNetty.Buffers.Tests.csproj +++ b/test/DotNetty.Buffers.Tests/DotNetty.Buffers.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Codecs.Mqtt.Tests/DotNetty.Codecs.Mqtt.Tests.csproj b/test/DotNetty.Codecs.Mqtt.Tests/DotNetty.Codecs.Mqtt.Tests.csproj index aef3c242d..9cbb6d594 100644 --- a/test/DotNetty.Codecs.Mqtt.Tests/DotNetty.Codecs.Mqtt.Tests.csproj +++ b/test/DotNetty.Codecs.Mqtt.Tests/DotNetty.Codecs.Mqtt.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Codecs.Protobuf.Tests/DotNetty.Codecs.Protobuf.Tests.csproj b/test/DotNetty.Codecs.Protobuf.Tests/DotNetty.Codecs.Protobuf.Tests.csproj index d05f4d68a..ff58dd1a2 100644 --- a/test/DotNetty.Codecs.Protobuf.Tests/DotNetty.Codecs.Protobuf.Tests.csproj +++ b/test/DotNetty.Codecs.Protobuf.Tests/DotNetty.Codecs.Protobuf.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Codecs.ProtocolBuffers.Tests/DotNetty.Codecs.ProtocolBuffers.Tests.csproj b/test/DotNetty.Codecs.ProtocolBuffers.Tests/DotNetty.Codecs.ProtocolBuffers.Tests.csproj index 930b7fdcd..0ca6dbc3b 100644 --- a/test/DotNetty.Codecs.ProtocolBuffers.Tests/DotNetty.Codecs.ProtocolBuffers.Tests.csproj +++ b/test/DotNetty.Codecs.ProtocolBuffers.Tests/DotNetty.Codecs.ProtocolBuffers.Tests.csproj @@ -1,12 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false $(PackageTargetFallback);portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8 - + + + + + + diff --git a/test/DotNetty.Codecs.Redis.Tests/DotNetty.Codecs.Redis.Tests.csproj b/test/DotNetty.Codecs.Redis.Tests/DotNetty.Codecs.Redis.Tests.csproj index b1d279c4e..9388da8ff 100644 --- a/test/DotNetty.Codecs.Redis.Tests/DotNetty.Codecs.Redis.Tests.csproj +++ b/test/DotNetty.Codecs.Redis.Tests/DotNetty.Codecs.Redis.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Codecs.Tests/DotNetty.Codecs.Tests.csproj b/test/DotNetty.Codecs.Tests/DotNetty.Codecs.Tests.csproj index 8611de169..a55e15c3e 100644 --- a/test/DotNetty.Codecs.Tests/DotNetty.Codecs.Tests.csproj +++ b/test/DotNetty.Codecs.Tests/DotNetty.Codecs.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Common.Tests/DotNetty.Common.Tests.csproj b/test/DotNetty.Common.Tests/DotNetty.Common.Tests.csproj index 41f874004..32218df49 100644 --- a/test/DotNetty.Common.Tests/DotNetty.Common.Tests.csproj +++ b/test/DotNetty.Common.Tests/DotNetty.Common.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Handlers.Tests/DotNetty.Handlers.Tests.csproj b/test/DotNetty.Handlers.Tests/DotNetty.Handlers.Tests.csproj index 40e97f62a..9e45ef3a6 100644 --- a/test/DotNetty.Handlers.Tests/DotNetty.Handlers.Tests.csproj +++ b/test/DotNetty.Handlers.Tests/DotNetty.Handlers.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Microbench/DotNetty.Microbench.csproj b/test/DotNetty.Microbench/DotNetty.Microbench.csproj index 344cb7b79..2c3818b4e 100644 --- a/test/DotNetty.Microbench/DotNetty.Microbench.csproj +++ b/test/DotNetty.Microbench/DotNetty.Microbench.csproj @@ -2,7 +2,7 @@ Exe true - netcoreapp1.1 + netcoreapp2.0;netcoreapp1.1 false ../../DotNetty.snk true diff --git a/test/DotNetty.Tests.Common/DotNetty.Tests.Common.csproj b/test/DotNetty.Tests.Common/DotNetty.Tests.Common.csproj index 035d6f1b3..9afbd4345 100644 --- a/test/DotNetty.Tests.Common/DotNetty.Tests.Common.csproj +++ b/test/DotNetty.Tests.Common/DotNetty.Tests.Common.csproj @@ -2,7 +2,7 @@ true false - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 ../../DotNetty.snk true @@ -10,8 +10,13 @@ - + + + + + + diff --git a/test/DotNetty.Tests.End2End/DotNetty.Tests.End2End.csproj b/test/DotNetty.Tests.End2End/DotNetty.Tests.End2End.csproj index bd34b7cd2..9a7956ce2 100644 --- a/test/DotNetty.Tests.End2End/DotNetty.Tests.End2End.csproj +++ b/test/DotNetty.Tests.End2End/DotNetty.Tests.End2End.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + diff --git a/test/DotNetty.Transport.Libuv.Tests/DotNetty.Transport.Libuv.Tests.csproj b/test/DotNetty.Transport.Libuv.Tests/DotNetty.Transport.Libuv.Tests.csproj index fcb22d1b4..923bfb1ca 100644 --- a/test/DotNetty.Transport.Libuv.Tests/DotNetty.Transport.Libuv.Tests.csproj +++ b/test/DotNetty.Transport.Libuv.Tests/DotNetty.Transport.Libuv.Tests.csproj @@ -1,7 +1,7 @@ true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true @@ -9,8 +9,13 @@ win-x64 - + + + + + + diff --git a/test/DotNetty.Transport.Tests/DotNetty.Transport.Tests.csproj b/test/DotNetty.Transport.Tests/DotNetty.Transport.Tests.csproj index b4d81eb10..0a8fc4ebe 100644 --- a/test/DotNetty.Transport.Tests/DotNetty.Transport.Tests.csproj +++ b/test/DotNetty.Transport.Tests/DotNetty.Transport.Tests.csproj @@ -1,13 +1,18 @@  true - netcoreapp1.1;net452 + netcoreapp2.0;netcoreapp1.1;net452 false ../../DotNetty.snk true - + + + + + + From 124385a581e9fa731bc5ebb42ef0aaf525725944 Mon Sep 17 00:00:00 2001 From: Jon Steinich Date: Wed, 21 Mar 2018 11:56:20 -0500 Subject: [PATCH 2/3] fix dotnet install url --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index c141451f0..365995c7b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,6 @@ $CakeVersion = "0.17.0" $DotNetVersion = "2.0.3"; -$DotNetInstallerUri = "https://raw.githubusercontent.com/dotnet/cli/rel/2.0.3/scripts/obtain/dotnet-install.ps1"; +$DotNetInstallerUri = "https://raw.githubusercontent.com/dotnet/cli/v2.0.3/scripts/obtain/dotnet-install.ps1"; # Make sure tools folder exists $PSScriptRoot = $pwd From d35d40afa6196d7280d945f9ae7cd8d5fdb1b0ee Mon Sep 17 00:00:00 2001 From: Jon Steinich Date: Wed, 21 Mar 2018 13:10:11 -0500 Subject: [PATCH 3/3] Update precompile flag checks --- examples/Examples.Common/ExampleHelper.cs | 4 ++-- src/DotNetty.Buffers/UnsafeByteBufferUtil .cs | 2 +- src/DotNetty.Handlers/Tls/SniHandler.cs | 6 +++--- src/DotNetty.Handlers/Tls/TlsHandler.cs | 16 ++++++++-------- .../Native/NativeMethods.cs | 12 ++++++------ .../Native/WindowsApi.cs | 4 ++-- .../Native/WriteRequest.cs | 4 ++-- .../Sockets/AbstractSocketByteChannel.cs | 8 ++++---- .../Channels/Sockets/SocketDatagramChannel.cs | 4 ++-- 9 files changed, 30 insertions(+), 30 deletions(-) diff --git a/examples/Examples.Common/ExampleHelper.cs b/examples/Examples.Common/ExampleHelper.cs index 0ae7b20c6..428c513a7 100644 --- a/examples/Examples.Common/ExampleHelper.cs +++ b/examples/Examples.Common/ExampleHelper.cs @@ -22,10 +22,10 @@ public static string ProcessDirectory { get { -#if NETSTANDARD1_3 +#if NETSTANDARD1_3 || NETSTANDARD2_0 return AppContext.BaseDirectory; #else - return AppDomain.CurrentDomain.BaseDirectory; + return AppDomain.CurrentDomain.BaseDirectory; #endif } } diff --git a/src/DotNetty.Buffers/UnsafeByteBufferUtil .cs b/src/DotNetty.Buffers/UnsafeByteBufferUtil .cs index e2f9816c2..af971df3f 100644 --- a/src/DotNetty.Buffers/UnsafeByteBufferUtil .cs +++ b/src/DotNetty.Buffers/UnsafeByteBufferUtil .cs @@ -352,7 +352,7 @@ internal static void SetZero(byte* addr, int length) internal static string GetString(byte* src, int length, Encoding encoding) { -#if NETSTANDARD1_3 +#if NETSTANDARD1_3 || NETSTANDARD2_0 return encoding.GetString(src, length); #else int charCount = encoding.GetCharCount(src, length); diff --git a/src/DotNetty.Handlers/Tls/SniHandler.cs b/src/DotNetty.Handlers/Tls/SniHandler.cs index 8a797a119..843b9e838 100644 --- a/src/DotNetty.Handlers/Tls/SniHandler.cs +++ b/src/DotNetty.Handlers/Tls/SniHandler.cs @@ -214,9 +214,9 @@ protected override void Decode(IChannelHandlerContext context, IByteBuffer input }; hostname = idn.GetAscii(hostname); -#if NETSTANDARD1_3 - // TODO: netcore does not have culture sensitive tolower() - hostname = hostname.ToLowerInvariant(); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + // TODO: netcore does not have culture sensitive tolower() + hostname = hostname.ToLowerInvariant(); #else hostname = hostname.ToLower(new CultureInfo("en-US")); #endif diff --git a/src/DotNetty.Handlers/Tls/TlsHandler.cs b/src/DotNetty.Handlers/Tls/TlsHandler.cs index d58684ac8..2058874e6 100644 --- a/src/DotNetty.Handlers/Tls/TlsHandler.cs +++ b/src/DotNetty.Handlers/Tls/TlsHandler.cs @@ -665,8 +665,8 @@ sealed class MediationStream : Stream int inputLength; TaskCompletionSource readCompletionSource; ArraySegment sslOwnedBuffer; -#if NETSTANDARD1_3 - int readByteCount; +#if NETSTANDARD1_3 || NETSTANDARD2_0 + int readByteCount; #else SynchronousAsyncResult syncReadResult; AsyncCallback readCallback; @@ -710,8 +710,8 @@ public void ExpandSource(int count) ArraySegment sslBuffer = this.sslOwnedBuffer; -#if NETSTANDARD1_3 - this.readByteCount = this.ReadFromInput(sslBuffer.Array, sslBuffer.Offset, sslBuffer.Count); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + this.readByteCount = this.ReadFromInput(sslBuffer.Array, sslBuffer.Offset, sslBuffer.Count); // hack: this tricks SslStream's continuation to run synchronously instead of dispatching to TP. Remove once Begin/EndRead are available. new Task( ms => @@ -731,8 +731,8 @@ public void ExpandSource(int count) #endif } -#if NETSTANDARD1_3 - public override Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) +#if NETSTANDARD1_3 || NETSTANDARD2_0 + public override Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { if (this.inputLength - this.inputOffset > 0) { @@ -805,8 +805,8 @@ IAsyncResult PrepareSyncReadResult(int readBytes, object state) public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => this.owner.FinishWrapNonAppDataAsync(buffer, offset, count); -#if !NETSTANDARD1_3 - static readonly Action WriteCompleteCallback = HandleChannelWriteComplete; +#if !NETSTANDARD1_3 && !NETSTANDARD2_0 + static readonly Action WriteCompleteCallback = HandleChannelWriteComplete; public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { diff --git a/src/DotNetty.Transport.Libuv/Native/NativeMethods.cs b/src/DotNetty.Transport.Libuv/Native/NativeMethods.cs index 29311dc75..ed910ca4f 100644 --- a/src/DotNetty.Transport.Libuv/Native/NativeMethods.cs +++ b/src/DotNetty.Transport.Libuv/Native/NativeMethods.cs @@ -331,8 +331,8 @@ internal static IPEndPoint TcpGetSocketName(IntPtr handle) { Debug.Assert(handle != IntPtr.Zero); -#if NETSTANDARD1_3 - int namelen = Marshal.SizeOf(); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + int namelen = Marshal.SizeOf(); #else int namelen = Marshal.SizeOf(typeof(sockaddr)); #endif @@ -344,8 +344,8 @@ internal static IPEndPoint TcpGetPeerName(IntPtr handle) { Debug.Assert(handle != IntPtr.Zero); -#if NETSTANDARD1_3 - int namelen = Marshal.SizeOf(); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + int namelen = Marshal.SizeOf(); #else int namelen = Marshal.SizeOf(typeof(sockaddr)); #endif @@ -354,8 +354,8 @@ internal static IPEndPoint TcpGetPeerName(IntPtr handle) return sockaddr.GetIPEndPoint(); } -#if NETSTANDARD1_3 - internal static IntPtr Allocate(int size) => Marshal.AllocCoTaskMem(size); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + internal static IntPtr Allocate(int size) => Marshal.AllocCoTaskMem(size); internal static void FreeMemory(IntPtr ptr) => Marshal.FreeCoTaskMem(ptr); #else diff --git a/src/DotNetty.Transport.Libuv/Native/WindowsApi.cs b/src/DotNetty.Transport.Libuv/Native/WindowsApi.cs index 1526ab494..f7b1e5c54 100644 --- a/src/DotNetty.Transport.Libuv/Native/WindowsApi.cs +++ b/src/DotNetty.Transport.Libuv/Native/WindowsApi.cs @@ -41,8 +41,8 @@ public void DetachFromIOCP(NativeHandle handle) IntPtr socket = IntPtr.Zero; NativeMethods.uv_fileno(handle.Handle, ref socket); -#if NETSTANDARD1_3 - uint len = (uint)Marshal.SizeOf(); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + uint len = (uint)Marshal.SizeOf(); #else uint len = (uint)Marshal.SizeOf(typeof(FILE_COMPLETION_INFORMATION)); #endif diff --git a/src/DotNetty.Transport.Libuv/Native/WriteRequest.cs b/src/DotNetty.Transport.Libuv/Native/WriteRequest.cs index f0da3c1fc..87d7428c4 100644 --- a/src/DotNetty.Transport.Libuv/Native/WriteRequest.cs +++ b/src/DotNetty.Transport.Libuv/Native/WriteRequest.cs @@ -26,8 +26,8 @@ sealed class WriteRequest : NativeRequest, ChannelOutboundBuffer.IMessageProcess static WriteRequest() { -#if NETSTANDARD1_3 - BufferSize = Marshal.SizeOf(); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + BufferSize = Marshal.SizeOf(); #else BufferSize = Marshal.SizeOf(typeof(uv_buf_t)); #endif diff --git a/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs b/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs index 9f77a316a..775fc8b06 100644 --- a/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs +++ b/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs @@ -154,8 +154,8 @@ protected override void ScheduleSocketRead() { SocketChannelAsyncOperation operation = this.ReadOperation; bool pending; -#if NETSTANDARD1_3 - pending = this.Socket.ReceiveAsync(operation); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + pending = this.Socket.ReceiveAsync(operation); #else if (ExecutionContext.IsFlowSuppressed()) { @@ -309,8 +309,8 @@ protected bool IncompleteWrite(bool scheduleAsync, SocketChannelAsyncOperation o this.SetState(StateFlags.WriteScheduled); bool pending; -#if NETSTANDARD1_3 - pending = this.Socket.SendAsync(operation); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + pending = this.Socket.SendAsync(operation); #else if (ExecutionContext.IsFlowSuppressed()) { diff --git a/src/DotNetty.Transport/Channels/Sockets/SocketDatagramChannel.cs b/src/DotNetty.Transport/Channels/Sockets/SocketDatagramChannel.cs index 6431db8fe..31028cf54 100644 --- a/src/DotNetty.Transport/Channels/Sockets/SocketDatagramChannel.cs +++ b/src/DotNetty.Transport/Channels/Sockets/SocketDatagramChannel.cs @@ -115,8 +115,8 @@ protected override void ScheduleSocketRead() operation.SetBuffer(bytes.Array, bytes.Offset, bytes.Count); bool pending; -#if NETSTANDARD1_3 - pending = this.Socket.ReceiveFromAsync(operation); +#if NETSTANDARD1_3 || NETSTANDARD2_0 + pending = this.Socket.ReceiveFromAsync(operation); #else if (ExecutionContext.IsFlowSuppressed()) {