Skip to content

Commit 66813a4

Browse files
authored
Upgrade .NET SDK to 8.0.201. (#978)
I've updated the .NET SDK to `8.0`, which is the most recent LTS version. Support ends on 10 November 2026. There are several C# projects in the SBE solution. Only `sbe-dll` is consumed by users of SBE. Previously, `sbe-dll` had two targets: - `.NET Standard 2.0` (2017, supported by `.NET Framework >= 4.6.1` and `.NET Core >= 2.0`, which were both superseded by `.NET`) - `.NET Framework 4.5` (2012) In this commit, I have removed the _ancient_ `.NET Framework 4.5` target. This makes it easier to build SBE on Linux, as one only needs a recent .NET installation. I have also changed the other C# projects to target `.NET 8.0` and updated their dependencies.
1 parent ddd6467 commit 66813a4

File tree

7 files changed

+20
-38
lines changed

7 files changed

+20
-38
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
strategy:
7272
fail-fast: false
7373
matrix:
74-
dotnet: [ '3.1.x' ]
74+
dotnet: [ '8.0.x' ]
7575
env:
7676
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
7777
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>Org.SbeTool.Sbe.Benchmarks</RootNamespace>
66
<AssemblyName>sbe-benchmarks</AssemblyName>
77
<OutputTypeEx>exe</OutputTypeEx>
8-
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014. All rights reserved.</Copyright>
8+
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014-2024. All rights reserved.</Copyright>
99
<Product>SBE</Product>
1010
<OutputType>Exe</OutputType>
1111
</PropertyGroup>
@@ -16,9 +16,8 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
20-
<PackageReference Include="BenchmarkDotNet.Annotations" Version="0.12.1" />
21-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
19+
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
20+
<PackageReference Include="BenchmarkDotNet.Annotations" Version="0.13.12" />
2221
</ItemGroup>
2322

2423
</Project>

csharp/sbe-dll/sbe-dll.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
3+
<TargetFramework>netstandard2.0</TargetFramework>
44
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
55
<AssemblyName>SBE</AssemblyName>
66
<RootNamespace>Org.SbeTool.Sbe.Dll</RootNamespace>
77
<Product>Org.SbeTool.Sbe.Dll</Product>
8-
<Copyright>Copyright (C) Bill Segall 2018-2021, MarketFactory Inc 2017, Adaptive 2014. All rights reserved.</Copyright>
8+
<Copyright>Copyright (C) Bill Segall 2018-2021, MarketFactory Inc 2017, Adaptive 2014-2024. All rights reserved.</Copyright>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
<Authors>Bill Segall, MarketFactory Inc, Adaptive Consulting</Authors>
1111
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
@@ -37,10 +37,6 @@
3737
</None>
3838
</ItemGroup>
3939

40-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
41-
<Reference Include="System.Runtime" />
42-
</ItemGroup>
43-
4440
<ItemGroup>
4541
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
4642
<PackageReference Include="System.Memory" Version="4.5.3" />
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>Org.SbeTool.Sbe.Generated</RootNamespace>
66
<AssemblyName>Org.SbeTool.Sbe.Generated</AssemblyName>
7-
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014. All rights reserved.</Copyright>
7+
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014-2024. All rights reserved.</Copyright>
8+
<LangVersion>9</LangVersion>
89
</PropertyGroup>
910

1011
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
11-
<DefineConstants>TRACE,SBE_ENABLE_PRECEDENCE_CHECKS</DefineConstants>
12+
<DefineConstants>TRACE;SBE_ENABLE_PRECEDENCE_CHECKS</DefineConstants>
1213
</PropertyGroup>
1314

1415
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
15-
<DefineConstants>TRACE,SBE_ENABLE_PRECEDENCE_CHECKS</DefineConstants>
16+
<DefineConstants>TRACE;SBE_ENABLE_PRECEDENCE_CHECKS</DefineConstants>
1617
</PropertyGroup>
1718

1819
<ItemGroup>
1920
<ProjectReference Include="..\sbe-dll\sbe-dll.csproj" />
2021
</ItemGroup>
2122

22-
<ItemGroup>
23-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
24-
</ItemGroup>
25-
2623
</Project>

csharp/sbe-samples-car/sbe-samples-car.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp3.1</TargetFrameworks>
4+
<TargetFramework>net8.0</TargetFramework>
55
<OutputType>exe</OutputType>
66
<RootNamespace>Org.SbeTool.Sbe.Example.Car</RootNamespace>
77
<AssemblyName>Org.SbeTool.Sbe.Example.Car</AssemblyName>
@@ -16,8 +16,4 @@
1616
<ProjectReference Include="..\sbe-generated\sbe-generated.csproj" />
1717
</ItemGroup>
1818

19-
<ItemGroup>
20-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
21-
</ItemGroup>
22-
2319
</Project>
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
4+
<TargetFramework>net8.0</TargetFramework>
55
<OutputTypeEx>exe</OutputTypeEx>
66
<RootNamespace>Org.SbeTool.Sbe.Example.Extension</RootNamespace>
77
<AssemblyName>Org.SbeTool.Sbe.Example.Extension</AssemblyName>
8-
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014. All rights reserved.</Copyright>
8+
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014-2024. All rights reserved.</Copyright>
99
</PropertyGroup>
1010

1111
<ItemGroup>
@@ -17,9 +17,4 @@
1717
<ProjectReference Include="..\sbe-generated\sbe-generated.csproj" />
1818
</ItemGroup>
1919

20-
<ItemGroup>
21-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
22-
23-
</ItemGroup>
24-
2520
</Project>

csharp/sbe-tests/sbe-tests.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net45;netcoreapp3.1</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
44
<RootNamespace>Org.SbeTool.Sbe.Tests</RootNamespace>
55
<AssemblyName>Org.SbeTool.Sbe.UnitTests</AssemblyName>
66
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
7-
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014. All rights reserved.</Copyright>
7+
<Copyright>Copyright (C) Bill Segall 2018, MarketFactory Inc 2017, Adaptive 2014-2024. All rights reserved.</Copyright>
88
</PropertyGroup>
99

1010
<ItemGroup>
@@ -18,10 +18,9 @@
1818
</ItemGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" PrivateAssets="All" />
22-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
23-
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
24-
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
21+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
22+
<PackageReference Include="MSTest.TestAdapter" Version="3.2.2" />
23+
<PackageReference Include="MSTest.TestFramework" Version="3.2.2" />
2524
</ItemGroup>
2625

2726
</Project>

0 commit comments

Comments
 (0)