THRIFT-4982 Remove deprecated C# bindings from the code base
Client: csharp
Patch: Jens Geyer

This closes #2027
diff --git a/debian/control b/debian/control
index 414a815..a9e934f 100644
--- a/debian/control
+++ b/debian/control
@@ -1,8 +1,8 @@
 Source: thrift
 Section: devel
 Priority: extra
-Build-Depends: debhelper (>= 9), build-essential, mono-mcs, python-dev, ant,
-    mono-devel,  libmono-system-web4.0-cil, erlang-base, ruby-dev | ruby1.9.1-dev, ruby-bundler ,autoconf, automake,
+Build-Depends: dotnet-runtime-3.1, dotnet-sdk-3.1, debhelper (>= 9), build-essential, python-dev, ant,
+    erlang-base, ruby-dev | ruby1.9.1-dev, ruby-bundler ,autoconf, automake,
     pkg-config, libtool, bison, flex, libboost-dev | libboost1.56-dev | libboost1.63-all-dev,
     python-all, python-setuptools, python-all-dev, python-all-dbg,
     python3-all, python3-setuptools, python3-all-dev, python3-all-dbg,
@@ -126,17 +126,16 @@
  classes, and then the modules in this package will allow you to use those
  classes in your programs.
 
-Package: libthrift-cil
+Package: libthrift-netstd
 Architecture: all
-Section: cli-mono
-Depends: cli-common, libmono-corlib4.0-cil (>= 2.10) | libmono-corlib4.5-cil (>=3.2), libmono-system4.0-cil (>= 2.10),
-    libmono-system-web4.0-cil (>= 2.10), ${misc:Depends}
-Description: CLI bindings for Thrift
+Section: netstd
+Depends: dotnet-runtime-3.1, ${misc:Depends}
+Description: NET Standard bindings for Thrift
  Thrift is a software framework for scalable cross-language services
  development. It combines a software stack with a code generation engine to
  build services that work efficiently and seamlessly.
  .
- This package contains the CLI bindings for Thrift. You will need the thrift
+ This package contains the NET Standard bindings for Thrift. You will need the thrift
  tool (in the thrift-compiler package) to compile your definition to C#
  classes, and then the modules in this package will allow you to use those
  classes in your programs.
diff --git a/debian/copyright b/debian/copyright
index 3e6fcf7..ada769b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -29,7 +29,7 @@
 
   compiler/cpp/Makefile.am
   compiler/cpp/src/generate/t_cpp_generator.cc
-  compiler/cpp/src/generate/t_csharp_generator.cc
+  compiler/cpp/src/generate/t_netstd_generator.cc
   compiler/cpp/src/generate/t_erl_generator.cc
   compiler/cpp/src/generate/t_hs_generator.cc
   compiler/cpp/src/generate/t_java_generator.cc
@@ -46,36 +46,36 @@
   compiler/cpp/src/platform.h
   compiler/cpp/src/thriftl.ll
   compiler/cpp/src/thrifty.yy
-  lib/csharp/src/Protocol/TBinaryProtocol.cs
-  lib/csharp/src/Protocol/TField.cs
-  lib/csharp/src/Protocol/TList.cs
-  lib/csharp/src/Protocol/TMap.cs
-  lib/csharp/src/Protocol/TMessage.cs
-  lib/csharp/src/Protocol/TMessageType.cs
-  lib/csharp/src/Protocol/TProtocol.cs
-  lib/csharp/src/Protocol/TProtocolException.cs
-  lib/csharp/src/Protocol/TProtocolFactory.cs
-  lib/csharp/src/Protocol/TProtocolUtil.cs
-  lib/csharp/src/Protocol/TSet.cs
-  lib/csharp/src/Protocol/TStruct.cs
-  lib/csharp/src/Protocol/TType.cs
-  lib/csharp/src/Server/TServer.cs
-  lib/csharp/src/Server/TSimpleServer.cs
-  lib/csharp/src/Server/TThreadPoolServer.cs
-  lib/csharp/src/TApplicationException.cs
-  lib/csharp/src/Thrift.csproj
-  lib/csharp/src/Thrift.sln
-  lib/csharp/src/TProcessor.cs
-  lib/csharp/src/Transport/TServerSocket.cs
-  lib/csharp/src/Transport/TServerTransport.cs
-  lib/csharp/src/Transport/TSocket.cs
-  lib/csharp/src/Transport/TStreamTransport.cs
-  lib/csharp/src/Transport/TTransport.cs
-  lib/csharp/src/Transport/TTransportException.cs
-  lib/csharp/src/Transport/TTransportFactory.cs
-  lib/csharp/ThriftMSBuildTask/Properties/AssemblyInfo.cs
-  lib/csharp/ThriftMSBuildTask/ThriftBuild.cs
-  lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj
+  lib/netstd/src/Protocol/TBinaryProtocol.cs
+  lib/netstd/src/Protocol/TField.cs
+  lib/netstd/src/Protocol/TList.cs
+  lib/netstd/src/Protocol/TMap.cs
+  lib/netstd/src/Protocol/TMessage.cs
+  lib/netstd/src/Protocol/TMessageType.cs
+  lib/netstd/src/Protocol/TProtocol.cs
+  lib/netstd/src/Protocol/TProtocolException.cs
+  lib/netstd/src/Protocol/TProtocolFactory.cs
+  lib/netstd/src/Protocol/TProtocolUtil.cs
+  lib/netstd/src/Protocol/TSet.cs
+  lib/netstd/src/Protocol/TStruct.cs
+  lib/netstd/src/Protocol/TType.cs
+  lib/netstd/src/Server/TServer.cs
+  lib/netstd/src/Server/TSimpleServer.cs
+  lib/netstd/src/Server/TThreadPoolServer.cs
+  lib/netstd/src/TApplicationException.cs
+  lib/netstd/src/Thrift.csproj
+  lib/netstd/src/Thrift.sln
+  lib/netstd/src/TProcessor.cs
+  lib/netstd/src/Transport/TServerSocket.cs
+  lib/netstd/src/Transport/TServerTransport.cs
+  lib/netstd/src/Transport/TSocket.cs
+  lib/netstd/src/Transport/TStreamTransport.cs
+  lib/netstd/src/Transport/TTransport.cs
+  lib/netstd/src/Transport/TTransportException.cs
+  lib/netstd/src/Transport/TTransportFactory.cs
+  lib/netstd/ThriftMSBuildTask/Properties/AssemblyInfo.cs
+  lib/netstd/ThriftMSBuildTask/ThriftBuild.cs
+  lib/netstd/ThriftMSBuildTask/ThriftMSBuildTask.csproj
   lib/rb/lib/thrift.rb
   lib/st/README
   lib/st/thrift.st
diff --git a/debian/rules b/debian/rules
index e209ba3..d0de508 100755
--- a/debian/rules
+++ b/debian/rules
@@ -76,7 +76,7 @@
 		./gradlew --no-daemon -Prelease=true jar
 
 	# C#
-	$(MAKE) -C $(CURDIR)/lib/csharp
+	$(MAKE) -C $(CURDIR)/lib/netstd
 
 	# Ruby
 	$(MAKE) -C $(CURDIR)/lib/rb
@@ -122,9 +122,9 @@
 		$(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.9.1
 
 	# C#
-	mkdir -p $(CURDIR)/debian/libthrift-cil/usr/lib/cli/thrift/ && \
-	cp $(CURDIR)/lib/csharp/Thrift.dll \
-		$(CURDIR)/debian/libthrift-cil/usr/lib/cli/thrift/Thrift.dll
+	mkdir -p $(CURDIR)/debian/libthrift-netstd/usr/lib/cli/thrift/ && \
+	cp $(CURDIR)/lib/netstd/Thrift/bin/Release/netstandard2.0/Thrift.dll \
+		$(CURDIR)/debian/libthrift-netstd/usr/lib/cli/thrift/Thrift.dll
 
 	# Perl
 	$(MAKE) -C $(CURDIR)/lib/perl install DESTDIR=$(CURDIR)/debian/libthrift-perl