From 2cd40c25be78f00daa849cce0e97b00fc56631f3 Mon Sep 17 00:00:00 2001 From: martincostello Date: Thu, 17 Sep 2020 12:54:44 +0100 Subject: [PATCH 1/4] Support .NET 5 Add support for .NET 5.0 with net5.0 TFM, using RC1. --- Directory.Packages.props | 7 ++++--- global.json | 2 +- src/JustEat.StatsD/ConnectedSocketPool.cs | 2 +- src/JustEat.StatsD/EndpointLookups/EndPointFactory.cs | 2 +- src/JustEat.StatsD/JustEat.StatsD.csproj | 2 +- tests/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index ac02ce7f..68382c3d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -19,11 +19,12 @@ - + + - - + + diff --git a/global.json b/global.json index ee50270a..ef6ca776 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.403", + "version": "5.0.100-rc.1.20452.10", "allowPrerelease": false, "rollForward": "latestMajor" } diff --git a/src/JustEat.StatsD/ConnectedSocketPool.cs b/src/JustEat.StatsD/ConnectedSocketPool.cs index ed84fa6e..7de3adb7 100644 --- a/src/JustEat.StatsD/ConnectedSocketPool.cs +++ b/src/JustEat.StatsD/ConnectedSocketPool.cs @@ -48,7 +48,7 @@ private Socket CreateSocket() /// An object from the pool. private Socket? Pop() { - if (_pool.TryTake(out Socket result)) + if (_pool.TryTake(out Socket? result)) { return result; } diff --git a/src/JustEat.StatsD/EndpointLookups/EndPointFactory.cs b/src/JustEat.StatsD/EndpointLookups/EndPointFactory.cs index c89e58c4..ef3ca90b 100644 --- a/src/JustEat.StatsD/EndpointLookups/EndPointFactory.cs +++ b/src/JustEat.StatsD/EndpointLookups/EndPointFactory.cs @@ -57,7 +57,7 @@ public static IEndPointSource MakeEndPointSource(string host, int port, TimeSpan IEndPointSource source; - if (IPAddress.TryParse(host, out IPAddress address)) + if (IPAddress.TryParse(host, out IPAddress? address)) { // If we were given an IP instead of a hostname, // we can happily keep it the life of this class diff --git a/src/JustEat.StatsD/JustEat.StatsD.csproj b/src/JustEat.StatsD/JustEat.StatsD.csproj index 4521d393..10fcec5b 100644 --- a/src/JustEat.StatsD/JustEat.StatsD.csproj +++ b/src/JustEat.StatsD/JustEat.StatsD.csproj @@ -7,7 +7,7 @@ JustEat.StatsD JustEat.StatsD A .NET library for publishing metrics to StatsD. - net461;netstandard2.0;netstandard2.1;netcoreapp2.1 + net461;netstandard2.0;netstandard2.1;netcoreapp2.1;net5.0 diff --git a/tests/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj b/tests/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj index 3d6f41ed..c1b5b477 100644 --- a/tests/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj +++ b/tests/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj @@ -2,7 +2,7 @@ $(NoWarn);CA1707;CA2007 JustEat.StatsD - netcoreapp3.1 + net5.0 From 680b4946d936644935ca74a7b71c942b2f1b268b Mon Sep 17 00:00:00 2001 From: martincostello Date: Tue, 13 Oct 2020 22:46:13 +0100 Subject: [PATCH 2/4] Update to .NET 5 RC2 Update to RC2 of .NET 5. --- Directory.Build.props | 1 + Directory.Packages.props | 6 +++--- global.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index d2d0f3da..d15f8a30 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,6 +16,7 @@ latest true en-US + $(NoWarn);NU5104 enable package-icon.png Apache-2.0 diff --git a/Directory.Packages.props b/Directory.Packages.props index 68382c3d..e931ff75 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -20,11 +20,11 @@ - + - - + + diff --git a/global.json b/global.json index ef6ca776..9ee61147 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "5.0.100-rc.1.20452.10", + "version": "5.0.100-rc.2.20479.15", "allowPrerelease": false, "rollForward": "latestMajor" } From bbfffc8b5a53aa73fa948661465ad0b3dbe350ba Mon Sep 17 00:00:00 2001 From: martincostello Date: Wed, 14 Oct 2020 16:48:59 +0100 Subject: [PATCH 3/4] Bump version Bump the version to 4.2.0. --- version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.props b/version.props index 6357ee5e..21604418 100644 --- a/version.props +++ b/version.props @@ -1,7 +1,7 @@ 4.0.0.0 - 4.1.0 + 4.2.0 beta$([System.Convert]::ToInt32(`$(GITHUB_RUN_NUMBER)`).ToString(`0000`)) $(GITHUB_REF.Replace('refs/tags/v', '')) From cb4d1c7b23a905c8aa497f7153e51c3828850011 Mon Sep 17 00:00:00 2001 From: martincostello Date: Tue, 10 Nov 2020 08:16:34 +0000 Subject: [PATCH 4/4] Update to .NET 5 Update to the final release of .NET 5. --- Directory.Build.props | 1 - Directory.Packages.props | 6 +++--- README.md | 3 ++- global.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index d15f8a30..d2d0f3da 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,7 +16,6 @@ latest true en-US - $(NoWarn);NU5104 enable package-icon.png Apache-2.0 diff --git a/Directory.Packages.props b/Directory.Packages.props index e931ff75..86024d42 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -20,11 +20,11 @@ - + - - + + diff --git a/README.md b/README.md index c8951599..c4a3776b 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,13 @@ We use this library within our components to publish [StatsD](http://github.com/ ### Supported platforms -`JustEat.StatsD` version 4.1.0 is built for these target frameworks: +`JustEat.StatsD` version 4.2.0 is built for these target frameworks: * `net461` * `netstandard2.0` * `netstandard2.1` * `netcoreapp2.1` +* `net5.0` ### Features diff --git a/global.json b/global.json index 9ee61147..e0f5e71e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "5.0.100-rc.2.20479.15", + "version": "5.0.100", "allowPrerelease": false, "rollForward": "latestMajor" }