THRIFT-4990 Switch to .NET core 3.0
Client: netstsd
Patch: Jens Geyer
This closes #1909
diff --git a/CHANGES.md b/CHANGES.md
index 72c7eb8..8fffab6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,13 @@
# Apache Thrift Changelog
+## 0.14.0
+
+### Breaking Changes
+
+- [THRIFT-4990](https://issues.apache.org/jira/browse/THRIFT-4990) - Upgrade to .NET Core 3.0
+- [THRIFT-4981](https://issues.apache.org/jira/browse/THRIFT-4981) - Remove deprecated netcore bindings from the code base
+
+
## 0.13.0
### New Languages
diff --git a/build/docker/README.md b/build/docker/README.md
index 08c1372..e33c4e0 100644
--- a/build/docker/README.md
+++ b/build/docker/README.md
@@ -177,7 +177,7 @@
| d | 2.075.1 | 2.087.0 | |
| dart | 2.0.0 | 2.4.0 | |
| delphi | | | Not in CI |
-| dotnet | 2.1.503 | 2.2.300 | |
+| dotnet | 3.0 | 3.0 | |
| erlang | 18.3 | 22.0 | |
| go | 1.10.8 | 1.12.6 | |
| haskell | 7.10.3 | 8.0.2 | |
diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile
index 5f9833f..d38901f 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -130,7 +130,7 @@
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
- dotnet-sdk-2.2
+ dotnet-sdk-3.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/build/docker/ubuntu-disco/Dockerfile b/build/docker/ubuntu-disco/Dockerfile
index b017c4e..b63fd58 100644
--- a/build/docker/ubuntu-disco/Dockerfile
+++ b/build/docker/ubuntu-disco/Dockerfile
@@ -130,7 +130,7 @@
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
- dotnet-sdk-2.2
+ dotnet-sdk-3.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/build/docker/ubuntu-xenial/Dockerfile b/build/docker/ubuntu-xenial/Dockerfile
index 8dc6497..714a80d 100644
--- a/build/docker/ubuntu-xenial/Dockerfile
+++ b/build/docker/ubuntu-xenial/Dockerfile
@@ -127,7 +127,7 @@
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
- dotnet-sdk-2.1
+ dotnet-sdk-3.0
RUN apt-get install -y --no-install-recommends \
`# Erlang dependencies` \
diff --git a/configure.ac b/configure.ac
index d5d7ecb..f11ab13 100755
--- a/configure.ac
+++ b/configure.ac
@@ -505,7 +505,7 @@
if test "$with_netstd" = "yes"; then
AC_PATH_PROG([DOTNETCORE], [dotnet])
if [[ -x "$DOTNETCORE" ]] ; then
- AX_PROG_DOTNETCORE_VERSION( [2.0.0], have_netstd="yes", have_netstd="no")
+ AX_PROG_DOTNETCORE_VERSION( [3.0.0], have_netstd="yes", have_netstd="no")
fi
fi
AM_CONDITIONAL(WITH_DOTNET, [test "$have_netstd" = "yes"])
diff --git a/lib/netstd/README.md b/lib/netstd/README.md
index 88ba73a..74f5ed8 100644
--- a/lib/netstd/README.md
+++ b/lib/netstd/README.md
@@ -11,7 +11,7 @@
- Build with scripts
## How to build on Unix/Linux
-- Ensure you have .NET SDK >= 2.0 installed, or use the [Ubuntu docker image](../../build/docker/README.md)
+- Ensure you have .NET Core SDK 3.0 installed, or use the [Ubuntu docker image](../../build/docker/README.md)
- Follow common automake build practice: `./ bootstrap && ./ configure && make`
## Known issues
diff --git a/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj b/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj
index 381d8aa..c3cdc11 100644
--- a/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj
+++ b/lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Thrift.IntegrationTests</AssemblyName>
<PackageId>Thrift.IntegrationTests</PackageId>
<OutputType>Exe</OutputType>
diff --git a/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj b/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj
index 58f61a2..498191f 100644
--- a/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj
+++ b/lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Thrift.PublicInterfaces.Compile.Tests</AssemblyName>
<PackageId>Thrift.PublicInterfaces.Compile.Tests</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
diff --git a/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj b/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj
index 434424d..b060182 100644
--- a/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj
+++ b/lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj
@@ -18,7 +18,7 @@
under the License.
-->
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CompareNETObjects" Version="4.58.0" />
diff --git a/lib/netstd/Thrift/Thrift.csproj b/lib/netstd/Thrift/Thrift.csproj
index 5d8a9c3..783b9e9 100644
--- a/lib/netstd/Thrift/Thrift.csproj
+++ b/lib/netstd/Thrift/Thrift.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
+ <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Thrift</AssemblyName>
<PackageId>Thrift</PackageId>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
diff --git a/test/netstd/Client/Client.csproj b/test/netstd/Client/Client.csproj
index ed30c30..c406f17 100644
--- a/test/netstd/Client/Client.csproj
+++ b/test/netstd/Client/Client.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
diff --git a/test/netstd/Client/Program.cs b/test/netstd/Client/Program.cs
index 62933e6..8dbff1a 100644
--- a/test/netstd/Client/Program.cs
+++ b/test/netstd/Client/Program.cs
@@ -47,24 +47,24 @@
switch(firstArg)
{
case "client":
- return TestClient.Execute(subArgs);
- case "performance":
+ Console.WriteLine("The 'client' argument is no longer required.");
+ PrintHelp();
+ return -1;
+ case "--performance-test":
return Tests.PerformanceTests.Execute();
case "--help":
PrintHelp();
return 0;
default:
- Console.WriteLine("Invalid argument: {0}", firstArg);
- PrintHelp();
- return -1;
+ return TestClient.Execute(subArgs);
}
}
private static void PrintHelp()
{
Console.WriteLine("Usage:");
- Console.WriteLine(" Client client [options]");
- Console.WriteLine(" Client performance");
+ Console.WriteLine(" Client [options]");
+ Console.WriteLine(" Client --performance-test");
Console.WriteLine(" Client --help");
Console.WriteLine("");
diff --git a/test/netstd/README.md b/test/netstd/README.md
index ed728d1..8350728 100644
--- a/test/netstd/README.md
+++ b/test/netstd/README.md
@@ -1,12 +1,12 @@
# Apache Thrift net-core-lib tests
-Tests for Thrift client library ported to Microsoft .Net Core
+Tests for Thrift client library ported to Microsoft .NET Core
# Content
- ThriftTest - tests for Thrift library
# Reused components
-- NET Core Standard 1.6 (SDK 2.0.0)
+- NET Core SDK 3.0
# How to build on Windows
- Get Thrift IDL compiler executable, add to some folder and add path to this folder into PATH variable
@@ -15,6 +15,6 @@
- Build with scripts
# How to build on Unix
-- Ensure you have .NET Core 2.0.0 SDK installed or use the Ubuntu Xenial docker image
+- Ensure you have .NET Core 3.0 SDK installed or use the Ubuntu Xenial docker image
- Follow common build practice for Thrift: bootstrap, configure, and make precross
diff --git a/test/netstd/Server/Program.cs b/test/netstd/Server/Program.cs
index 8bfa371..4525ab7 100644
--- a/test/netstd/Server/Program.cs
+++ b/test/netstd/Server/Program.cs
@@ -47,21 +47,21 @@
switch(firstArg)
{
case "server":
- return TestServer.Execute(subArgs);
+ Console.WriteLine("The 'server' argument is no longer required.");
+ PrintHelp();
+ return -1;
case "--help":
PrintHelp();
return 0;
default:
- Console.WriteLine("Invalid argument: {0}", firstArg);
- PrintHelp();
- return -1;
+ return TestServer.Execute(subArgs);
}
}
private static void PrintHelp()
{
Console.WriteLine("Usage:");
- Console.WriteLine(" Server server [options]'");
+ Console.WriteLine(" Server [options]");
Console.WriteLine(" Server --help");
Console.WriteLine("");
diff --git a/test/netstd/Server/Server.csproj b/test/netstd/Server/Server.csproj
index 44f46c9..4f2463c 100644
--- a/test/netstd/Server/Server.csproj
+++ b/test/netstd/Server/Server.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>
diff --git a/tutorial/netstd/Client/Client.csproj b/tutorial/netstd/Client/Client.csproj
index a1470a9..2abf53c 100644
--- a/tutorial/netstd/Client/Client.csproj
+++ b/tutorial/netstd/Client/Client.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
diff --git a/tutorial/netstd/Interfaces/Interfaces.csproj b/tutorial/netstd/Interfaces/Interfaces.csproj
index 4ebeb4f..2d8a440 100644
--- a/tutorial/netstd/Interfaces/Interfaces.csproj
+++ b/tutorial/netstd/Interfaces/Interfaces.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
+ <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Interfaces</AssemblyName>
<PackageId>Interfaces</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
diff --git a/tutorial/netstd/README.md b/tutorial/netstd/README.md
index b1dea4e..11fd541 100644
--- a/tutorial/netstd/README.md
+++ b/tutorial/netstd/README.md
@@ -1,11 +1,11 @@
# Building of samples for different platforms
# Reused components
-- NET Core Standard 2.0
-- NET Core App 2.0
+- NET Core Standard 3.0
+- NET Core App 3.0
# How to build
-- Download and install the latest .NET Core SDK for your platform https://www.microsoft.com/net/core#windowsvs2015 (archive for SDK 1.0.0-preview2-003121 located by: https://github.com/dotnet/core/blob/master/release-notes/download-archive.md)
+- Download and install the latest .NET Core SDK for your platform https://dotnet.microsoft.com/download/dotnet-core
- Ensure that you have thrift.exe which supports netstd lib and it added to PATH
- Go to current folder
- Run **build.sh** or **build.cmd** from the root of cloned repository
diff --git a/tutorial/netstd/Server/Program.cs b/tutorial/netstd/Server/Program.cs
index 25e7dae..e1dab01 100644
--- a/tutorial/netstd/Server/Program.cs
+++ b/tutorial/netstd/Server/Program.cs
@@ -346,7 +346,7 @@
public class Startup
{
- public Startup(IHostingEnvironment env)
+ public Startup(IWebHostEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
@@ -366,7 +366,7 @@
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.UseMiddleware<THttpServerTransport>();
}
diff --git a/tutorial/netstd/Server/Server.csproj b/tutorial/netstd/Server/Server.csproj
index fbc2c03..454f332 100644
--- a/tutorial/netstd/Server/Server.csproj
+++ b/tutorial/netstd/Server/Server.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>