THRIFT-5407: Minor changes in .NET to support netcoreapp3.1
Client: netstd
Patch: Mario Emmenlauer
This closes #2384
diff --git a/test/netstd/Client/Client.csproj b/test/netstd/Client/Client.csproj
index 828ea73..d3504d4 100644
--- a/test/netstd/Client/Client.csproj
+++ b/test/netstd/Client/Client.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
diff --git a/test/netstd/Client/Program.cs b/test/netstd/Client/Program.cs
index 7e502cd..bcc02a2 100644
--- a/test/netstd/Client/Program.cs
+++ b/test/netstd/Client/Program.cs
@@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.InteropServices;
using ThriftTest;
namespace Client
@@ -26,8 +27,8 @@
{
public static int Main(string[] args)
{
- if (OperatingSystem.IsWindows())
- {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
try
{
Console.SetBufferSize(Console.BufferWidth, 4096);
@@ -69,5 +70,3 @@
}
}
}
-
-
diff --git a/test/netstd/Server/Program.cs b/test/netstd/Server/Program.cs
index 0052bce..8f1f36d 100644
--- a/test/netstd/Server/Program.cs
+++ b/test/netstd/Server/Program.cs
@@ -18,6 +18,7 @@
using System;
using System.Linq;
using System.Collections.Generic;
+using System.Runtime.InteropServices;
using ThriftTest;
namespace Server
@@ -26,7 +27,7 @@
{
public static int Main(string[] args)
{
- if (OperatingSystem.IsWindows())
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
try
{
@@ -65,5 +66,3 @@
}
}
}
-
-
diff --git a/test/netstd/Server/Server.csproj b/test/netstd/Server/Server.csproj
index fe1c394..e2ec93c 100644
--- a/test/netstd/Server/Server.csproj
+++ b/test/netstd/Server/Server.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>
diff --git a/tutorial/netstd/Client/Client.csproj b/tutorial/netstd/Client/Client.csproj
index 8a923e1..e91b7a9 100644
--- a/tutorial/netstd/Client/Client.csproj
+++ b/tutorial/netstd/Client/Client.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>
diff --git a/tutorial/netstd/Server/Server.csproj b/tutorial/netstd/Server/Server.csproj
index 9da3249..b63967b 100644
--- a/tutorial/netstd/Server/Server.csproj
+++ b/tutorial/netstd/Server/Server.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
+ <LangVersion>9.0</LangVersion>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>