Skip to content

Commit 874283f

Browse files
Updating the entire solution to include .NET 10 as a compile target.
* Updated GitHub Actions steps (`checkout` and `setup-dotnet`) to v5, `sdk.version` in `global.json` to `10.0.x`, and `TargetFrameworks` to include `net10.0`. * Fixed breaking code changes as a result of .NET 10 relating to implicit conversion. * Refactored tests to use xUnit v3 and Microsoft Test Platform. * Reviewed and converted many of the extension methods to .NET 10 extension blocks. * Scoped preconditions to their associated exceptions, and added attributes such as `NotNull`, and `CallerArgumentExpression`. * Eliminated some code due to implicit span conversion. * Updated lots of XMLDoc documentation, providing enhanced clarity.
1 parent 18f6977 commit 874283f

File tree

117 files changed

+3158
-3292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+3158
-3292
lines changed

.github/workflows/dotnet.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,26 @@ on:
1111

1212
env:
1313
USE_FULL_NUMERIC_PROVIDER: "true"
14+
MSBUILDDISABLENODEREUSE: "1"
1415

1516
jobs:
1617
build:
1718

1819
runs-on: ubuntu-latest
1920

2021
steps:
21-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2223
- name: Setup .NET
23-
uses: actions/setup-dotnet@v4
24+
uses: actions/setup-dotnet@v5
2425
with:
2526
global-json-file: global.json
2627
- name: Restore dependencies
2728
run: dotnet restore
2829
- name: Build
2930
run: dotnet build --no-restore
30-
- name: Test
31-
run: dotnet test --no-build --verbosity normal
31+
- name: Test (.NET 8.0)
32+
run: dotnet test --no-build --framework net8.0 --verbosity quiet
33+
- name: Test (.NET 9.0)
34+
run: dotnet test --no-build --framework net9.0 --verbosity quiet
35+
- name: Test (.NET 10.0)
36+
run: dotnet test --no-build --framework net10.0 --verbosity quiet

Directory.Build.props

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<!--GLOBAL-->
44
<PropertyGroup>
5-
<Version>12.2.0</Version>
6-
<PackageVersion>12.2.0</PackageVersion>
7-
<AssemblyVersion>12.2.0</AssemblyVersion>
8-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
9-
<LangVersion>13</LangVersion>
5+
<Version>13.0.0</Version>
6+
<PackageVersion>13.0.0</PackageVersion>
7+
<AssemblyVersion>13.0.0</AssemblyVersion>
8+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
9+
<LangVersion>14</LangVersion>
1010
<Nullable>enable</Nullable>
1111
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1212
<Authors>ONIXLabs</Authors>
@@ -41,16 +41,15 @@
4141

4242
<!--UNIT TESTS-->
4343
<PropertyGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.UnitTests'))">
44+
<OutputType>Exe</OutputType>
4445
<IsTestProject>true</IsTestProject>
4546
<IsPackable>false</IsPackable>
4647
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
48+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
4749
</PropertyGroup>
4850

4951
<ItemGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.UnitTests'))">
50-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/>
51-
<PackageReference Include="xunit" Version="2.9.3"/>
52-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"/>
53-
<PackageReference Include="coverlet.collector" Version="6.0.4"/>
52+
<PackageReference Include="xunit.v3" Version="3.2.0"/>
5453
<Using Include="Xunit"/>
5554
</ItemGroup>
5655

@@ -62,9 +61,14 @@
6261
</PropertyGroup>
6362

6463
<ItemGroup Condition="$([System.String]::Copy('$(MSBuildProjectName)').EndsWith('.UnitTests.Data'))">
65-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1"/>
66-
<PackageReference Include="xunit" Version="2.9.3"/>
64+
<PackageReference Include="xunit.v3.extensibility.core" Version="3.2.0"/>
65+
<Using Include="System"/>
66+
<Using Include="System.Collections.Generic"/>
67+
<Using Include="System.Reflection"/>
68+
<Using Include="System.Threading.Tasks"/>
6769
<Using Include="Xunit"/>
70+
<Using Include="Xunit.Sdk"/>
71+
<Using Include="Xunit.v3"/>
6872
</ItemGroup>
6973

7074
<!--PLAYGROUND-->

0 commit comments

Comments
 (0)