Skip to content

Commit d590bb5

Browse files
Refactoring for the release of .NET 10 and VS18 (#899)
* Refactoring for the release of .NET 10 and VS18 - Updating target frameworks, packages, tests and workflows. - Migrating the solution file to the new .slnx format. --------- Signed-off-by: Michele Bastione <michele.bastione@gmail.com>
1 parent 576a8cb commit d590bb5

File tree

11 files changed

+104
-142
lines changed

11 files changed

+104
-142
lines changed

.github/workflows/benchmark.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
- name: Setup .NET
1818
uses: actions/setup-dotnet@v4
1919
with:
20-
dotnet-version: 9.0.x
20+
dotnet-version: 10.0.x
2121
- name: Restore dependencies
2222
run: dotnet restore
2323
working-directory: ./benchmarks/MiniExcel.Benchmarks
2424
- name: Build
2525
run: dotnet build --no-restore
2626
working-directory: ./benchmarks/MiniExcel.Benchmarks
2727
- name: Benchmark
28-
run: dotnet run -c Release -f net9.0
28+
run: dotnet run -c Release -f net10.0
2929
working-directory: ./benchmarks/MiniExcel.Benchmarks
3030
env:
3131
BenchmarkMode: Automatic
@@ -47,15 +47,15 @@ jobs:
4747
- name: Setup .NET
4848
uses: actions/setup-dotnet@v4
4949
with:
50-
dotnet-version: 9.0.x
50+
dotnet-version: 10.0.x
5151
- name: Restore dependencies
5252
run: dotnet restore
5353
working-directory: ./benchmarks/MiniExcel.Benchmarks
5454
- name: Build
5555
run: dotnet build --no-restore
5656
working-directory: ./benchmarks/MiniExcel.Benchmarks
5757
- name: Benchmark
58-
run: dotnet run -c Release -f net9.0
58+
run: dotnet run -c Release -f net10.0
5959
working-directory: ./benchmarks/MiniExcel.Benchmarks
6060
env:
6161
BenchmarkMode: Automatic
@@ -77,15 +77,15 @@ jobs:
7777
- name: Setup .NET
7878
uses: actions/setup-dotnet@v4
7979
with:
80-
dotnet-version: 9.0.x
80+
dotnet-version: 10.0.x
8181
- name: Restore dependencies
8282
run: dotnet restore
8383
working-directory: ./benchmarks/MiniExcel.Benchmarks
8484
- name: Build
8585
run: dotnet build --no-restore
8686
working-directory: ./benchmarks/MiniExcel.Benchmarks
8787
- name: Benchmark
88-
run: dotnet run -c Release -f net9.0
88+
run: dotnet run -c Release -f net10.0
8989
working-directory: ./benchmarks/MiniExcel.Benchmarks
9090
env:
9191
BenchmarkMode: Automatic

.github/workflows/codeql-analysis.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [ v1.x-maintenance ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [ v1.x-maintenance ]
2020
schedule:
2121
- cron: '18 0 * * 0'
2222

@@ -40,10 +40,10 @@ jobs:
4040
- name: Checkout repository
4141
uses: actions/checkout@v4
4242

43-
- name: Setup .NET 9
44-
uses: actions/setup-dotnet@v1
43+
- name: Setup .NET 10
44+
uses: actions/setup-dotnet@v4
4545
with:
46-
dotnet-version: 9.0.x
46+
dotnet-version: 10.0.x
4747

4848
# Initializes the CodeQL tools for scanning.
4949
- name: Initialize CodeQL
@@ -57,8 +57,8 @@ jobs:
5757

5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
60-
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v3
60+
# - name: Autobuild
61+
# uses: github/codeql-action/autobuild@v3
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 https://git.io/JvXDl
@@ -67,9 +67,8 @@ jobs:
6767
# and modify them (or add more) to build your code if your project
6868
# uses a compiled language
6969

70-
#- run: |
71-
# make bootstrap
72-
# make release
73-
70+
- name: Manual build
71+
run: dotnet build MiniExcel.slnx -c Release -f net10.0
72+
7473
- name: Perform CodeQL Analysis
7574
uses: github/codeql-action/analyze@v3

.github/workflows/dotnet.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
7+
- v1.x-maintenance
88

99
jobs:
1010
build:
@@ -21,6 +21,10 @@ jobs:
2121
uses: actions/setup-dotnet@v4
2222
with:
2323
dotnet-version: 9.0.x
24+
- name: Setup .NET 10
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: 10.0.x
2428
- name: Restore dependencies
2529
run: dotnet restore
2630
env:

MiniExcel.sln

Lines changed: 0 additions & 70 deletions
This file was deleted.

MiniExcel.slnx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Solution>
2+
<Folder Name="/benchmarks/">
3+
<Project Path="benchmarks/MiniExcel.Benchmarks/MiniExcel.Benchmarks.csproj" />
4+
</Folder>
5+
<Folder Name="/Docs and setting/">
6+
<File Path=".gitattributes" />
7+
<File Path=".github/workflows/benchmark.yml" />
8+
<File Path=".github/workflows/codeql-analysis.yml" />
9+
<File Path=".github/workflows/dotnet.yml" />
10+
<File Path=".gitignore" />
11+
<File Path="appveyor.yml" />
12+
<File Path="LICENSE" />
13+
<File Path="README-NuGet.md" />
14+
<File Path="README.md" />
15+
<File Path="README.zh-CN.md" />
16+
<File Path="README.zh-Hant.md" />
17+
</Folder>
18+
<Folder Name="/Releases/">
19+
<File Path="docs/README.md" />
20+
<File Path="docs/README.zh-CN.md" />
21+
<File Path="docs/README.zh-Hant.md" />
22+
</Folder>
23+
<Folder Name="/src/">
24+
<Project Path="src/MiniExcel/MiniExcelLibs.csproj" />
25+
</Folder>
26+
<Folder Name="/tests/">
27+
<Project Path="tests/MiniExcelTests/MiniExcelTests.csproj" />
28+
</Folder>
29+
</Solution>

benchmarks/MiniExcel.Benchmarks/MiniExcel.Benchmarks.csproj

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

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<LangVersion>latest</LangVersion>
@@ -16,7 +16,7 @@
1616
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
1717
<PackageReference Include="EPPlus" Version="7.7.2" />
1818
<PackageReference Include="ExcelDataReader" Version="3.7.0" />
19-
<PackageReference Include="NPOI" Version="2.7.3" />
19+
<PackageReference Include="NPOI" Version="2.7.5" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

src/MiniExcel/MiniExcelLibs.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net45;netstandard2.0;net8.0;net9.0</TargetFrameworks>
3+
<TargetFrameworks>net45;netstandard2.0;net8.0;net9.0;net10.0</TargetFrameworks>
44
<Version>1.41.4</Version>
55
</PropertyGroup>
66
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
@@ -50,9 +50,9 @@ Todo : https://github.com/mini-software/MiniExcel/projects/1?fullscreen=true</De
5050
<None Include="..\..\README-NuGet.md" Link="README.md" Pack="true" PackagePath="README.md" />
5151
</ItemGroup>
5252
<ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
53-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
53+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
5454
</ItemGroup>
5555
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
56-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
56+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.0" />
5757
</ItemGroup>
5858
</Project>

tests/MiniExcelTests/MiniExcelIssueAsyncTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,15 +1324,15 @@ public async Task Issue142()
13241324
Assert.Equal("MyProperty5", rows[0].C);
13251325
Assert.Equal("MyProperty2", rows[0].D);
13261326
Assert.Equal("MyProperty6", rows[0].E);
1327-
Assert.Equal(null, rows[0].F);
1327+
Assert.Null(rows[0].F);
13281328
Assert.Equal("MyProperty3", rows[0].G);
13291329

13301330
Assert.Equal("MyProperty4", rows[0].A);
13311331
Assert.Equal("CustomColumnName", rows[0].B); //note
13321332
Assert.Equal("MyProperty5", rows[0].C);
13331333
Assert.Equal("MyProperty2", rows[0].D);
13341334
Assert.Equal("MyProperty6", rows[0].E);
1335-
Assert.Equal(null, rows[0].F);
1335+
Assert.Null(rows[0].F);
13361336
Assert.Equal("MyProperty3", rows[0].G);
13371337
}
13381338

tests/MiniExcelTests/MiniExcelIssueTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,15 +3067,15 @@ public void Issue142()
30673067
Assert.Equal("MyProperty5", rows[0].C);
30683068
Assert.Equal("MyProperty2", rows[0].D);
30693069
Assert.Equal("MyProperty6", rows[0].E);
3070-
Assert.Equal(null, rows[0].F);
3070+
Assert.Null(rows[0].F);
30713071
Assert.Equal("MyProperty3", rows[0].G);
30723072

30733073
Assert.Equal("MyProperty4", rows[0].A);
30743074
Assert.Equal("CustomColumnName", rows[0].B);
30753075
Assert.Equal("MyProperty5", rows[0].C);
30763076
Assert.Equal("MyProperty2", rows[0].D);
30773077
Assert.Equal("MyProperty6", rows[0].E);
3078-
Assert.Equal(null, rows[0].F);
3078+
Assert.Null(rows[0].F);
30793079
Assert.Equal("MyProperty3", rows[0].G);
30803080
}
30813081

@@ -4235,7 +4235,7 @@ public void TestIssue763()
42354235
var path = PathHelper.GetFile("xlsx/TestIssue763.xlsx");
42364236
var rows = MiniExcel.QueryRange(path, startCell: "A3", endCell: "J3").ToArray();
42374237
Assert.Equal("A3", rows[0].A);
4238-
Assert.Equal(null, rows[0].J);
4238+
Assert.Null(rows[0].J);
42394239
}
42404240

42414241
/// <summary>
@@ -4330,8 +4330,8 @@ public void TestIssue771()
43304330
var rows = MiniExcel.Query(path.FilePath).ToList();
43314331

43324332
Assert.Equal("2025-1", rows[2].B);
4333-
Assert.Equal(null, rows[3].B);
4334-
Assert.Equal(null, rows[4].B);
4333+
Assert.Null(rows[3].B);
4334+
Assert.Null(rows[4].B);
43354335
Assert.Equal("2025-2", rows[5].B);
43364336
return;
43374337

@@ -4658,7 +4658,7 @@ public void TestIssue809()
46584658
var rows = MiniExcel.Query(path).ToList();
46594659

46604660
Assert.Equal(3, rows.Count);
4661-
Assert.Equal(null, rows[0].A);
4661+
Assert.Null(rows[0].A);
46624662
Assert.Equal(2, rows[2].B);
46634663
}
46644664

0 commit comments

Comments
 (0)