THRIFT-5832 Drop net6 support and add net9 instead
Client: netstd
Patch: Jens Geyer
diff --git a/test/netstd/Client/Client.csproj b/test/netstd/Client/Client.csproj
index 78cc22a..d9f61f8 100644
--- a/test/netstd/Client/Client.csproj
+++ b/test/netstd/Client/Client.csproj
@@ -19,7 +19,7 @@
-->
<PropertyGroup>
- <TargetFramework>net8.0</TargetFramework>
+ <TargetFramework>net9.0</TargetFramework>
<LangVersion>latestMajor</LangVersion>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
@@ -35,9 +35,9 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="System.Net.Http.WinHttpHandler" Version="8.0.1" />
+ <PackageReference Include="System.Net.Http.WinHttpHandler" Version="9.0.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="[4.3,)" />
- <PackageReference Include="System.ServiceModel.Primitives" Version="8.0.0" />
+ <PackageReference Include="System.ServiceModel.Primitives" Version="8.1.0" />
<PackageReference Include="System.Threading" Version="[4.3,)" />
</ItemGroup>
@@ -49,8 +49,8 @@
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="where thrift" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="PathToThrift" />
</Exec>
- <Exec Condition="Exists('$(PathToThrift)')" Command=""$(PathToThrift)" -out $(ProjectDir) -gen netstd:wcf,union,serial,net8 -r ./../../ThriftTest.thrift" />
- <Exec Condition="Exists('thrift')" Command="thrift -out $(ProjectDir) -gen netstd:wcf,union,serial,net8 -r ./../../ThriftTest.thrift" />
- <Exec Condition="Exists('$(ProjectDir)/../../../compiler/cpp/thrift')" Command="$(ProjectDir)/../../../compiler/cpp/thrift -out $(ProjectDir) -gen netstd:wcf,union,serial,net8 -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('$(PathToThrift)')" Command=""$(PathToThrift)" -out $(ProjectDir) -gen netstd:wcf,union,serial,net9 -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('thrift')" Command="thrift -out $(ProjectDir) -gen netstd:wcf,union,serial,net9 -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('$(ProjectDir)/../../../compiler/cpp/thrift')" Command="$(ProjectDir)/../../../compiler/cpp/thrift -out $(ProjectDir) -gen netstd:wcf,union,serial,net9 -r ./../../ThriftTest.thrift" />
</Target>
</Project>
diff --git a/test/netstd/Client/TestClient.cs b/test/netstd/Client/TestClient.cs
index 7486712..26bd120 100644
--- a/test/netstd/Client/TestClient.cs
+++ b/test/netstd/Client/TestClient.cs
@@ -225,7 +225,8 @@
throw new FileNotFoundException($"Cannot find file: {clientCertName}");
}
- var cert = new X509Certificate2(existingPath, "thrift");
+ //var cert = new X509Certificate2(existingPath, "thrift");
+ var cert = X509CertificateLoader.LoadPkcs12FromFile(existingPath, "thrift");
return cert;
}
@@ -444,7 +445,7 @@
public static string BytesToHex(byte[] data)
{
- return BitConverter.ToString(data).Replace("-", string.Empty);
+ return Convert.ToHexString(data);
}