THRIFT-5407: Minor changes in .NET to support netcoreapp3.1

Client: netstd
Patch: Mario Emmenlauer

This closes #2384
This commit is contained in:
Mario Emmenlauer 2021-05-05 10:50:02 +02:00 committed by Jens Geyer
parent ecf273f060
commit aeb8964dda
6 changed files with 9 additions and 7 deletions

View File

@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>

View File

@ -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 @@ namespace Client
{
public static int Main(string[] args)
{
if (OperatingSystem.IsWindows())
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
try
{
Console.SetBufferSize(Console.BufferWidth, 4096);
@ -69,5 +70,3 @@ namespace Client
}
}
}

View File

@ -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 @@ namespace Server
{
public static int Main(string[] args)
{
if (OperatingSystem.IsWindows())
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
try
{
@ -65,5 +66,3 @@ namespace Server
}
}
}

View File

@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>

View File

@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<OutputType>Exe</OutputType>

View File

@ -20,6 +20,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<AssemblyName>Server</AssemblyName>
<PackageId>Server</PackageId>
<OutputType>Exe</OutputType>