THRIFT-5479 Add net 6 support
Client: netstd
Patch: Jens Geyer
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 126635d..1511274 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
@@ -21,7 +21,7 @@
<PropertyGroup>
<ThriftVersion>0.16.0</ThriftVersion>
<ThriftVersionOutput>Thrift version $(ThriftVersion)</ThriftVersionOutput>
- <TargetFramework>net5.0</TargetFramework>
+ <TargetFramework>net6.0</TargetFramework>
<Version>$(ThriftVersion).0</Version>
<AssemblyName>Thrift.PublicInterfaces.Compile.Tests</AssemblyName>
<PackageId>Thrift.PublicInterfaces.Compile.Tests</PackageId>
@@ -36,7 +36,11 @@
</ItemGroup>
<ItemGroup>
- <PackageReference Include="System.ServiceModel.Primitives" Version="4.8.1" />
+ <PackageReference Include="System.ServiceModel.Primitives" Version="4.9.0" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="_GenerateRestoreProjectSpec;Restore;Compile">
@@ -55,22 +59,13 @@
<CreateProperty Condition="Exists('$(ProjectDir)/../../../../compiler/cpp/thrift')" Value="$(ProjectDir)/../../../../compiler/cpp/thrift">
<Output TaskParameter="Value" PropertyName="PathToThrift" />
</CreateProperty>
- <Error
- Condition="!Exists('$(PathToThrift)')"
- Text="Thrift executable could not be found."
- />
+ <Error Condition="!Exists('$(PathToThrift)')" Text="Thrift executable could not be found." />
<!-- Make sure the thrift version found is the same as the projects version -->
<Exec Command="$(PathToThrift) -version" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="ThriftBinaryVersion" />
</Exec>
- <Error
- Condition="$('$(ThriftBinaryVersion)'::StartsWith('$(ThriftVersionOutput)')) == true"
- Text="Thrift version returned: '$(ThriftBinaryVersion)' is not equal to the projects version '$(ThriftVersionOutput)'."
- />
- <Message
- Importance="high"
- Text="Generating tests with thrift binary: '$(PathToThrift)'"
- />
+ <Error Condition="$('$(ThriftBinaryVersion)'::StartsWith('$(ThriftVersionOutput)')) == true" Text="Thrift version returned: '$(ThriftBinaryVersion)' is not equal to the projects version '$(ThriftVersionOutput)'." />
+ <Message Importance="high" Text="Generating tests with thrift binary: '$(PathToThrift)'" />
<!-- Generate the thrift test files -->
<Exec Command="$(PathToThrift) -gen netstd:wcf,union,serial -r ./CassandraTest.thrift" />
<Exec Command="$(PathToThrift) -gen netstd:wcf,union,serial -r ./optional_required_default.thrift" />