From 63de29a51cb2a4f7e2bfc8f27d4fcdfd2affeea5 Mon Sep 17 00:00:00 2001 From: LewisP Date: Thu, 11 Apr 2024 14:15:56 +0100 Subject: [PATCH 1/5] upgrade to dotnet 8 --- .../Helpers/DatafileFixture.cs | 2 +- ...ittleBlocks.Excel.ClosedXml.IntegrationTests.csproj | 10 +++++----- src/LittleBlocks.Excel.ClosedXml/DataSheetCell.cs | 2 +- .../LittleBlocks.Excel.ClosedXml.csproj | 10 +++++----- src/LittleBlocks.Excel.ClosedXml/WorkbookLoader.cs | 4 ++-- .../LittleBlocks.Excel.Extensions.csproj | 4 ++-- .../LittleBlocks.Excel.SampleApp.csproj | 8 ++++---- src/LittleBlocks.Excel.SampleApp/Program.cs | 2 +- .../LittleBlocks.Excel.UnitTests.csproj | 10 +++++----- src/LittleBlocks.Excel/LittleBlocks.Excel.csproj | 6 +++--- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/Helpers/DatafileFixture.cs b/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/Helpers/DatafileFixture.cs index 51e9a65..5119e78 100644 --- a/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/Helpers/DatafileFixture.cs +++ b/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/Helpers/DatafileFixture.cs @@ -37,7 +37,7 @@ public IWorkbook GetWorkbook(string dataFile) private IWorkbook LoadWorkbook(string dataFile) { var datafilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Data", dataFile); - var workbook = new XLWorkbook(GetMemoryStream(datafilePath), XLEventTracking.Disabled); + var workbook = new XLWorkbook(GetMemoryStream(datafilePath)); var fileName = Path.GetFileName(datafilePath); return new Workbook(workbook, fileName); } diff --git a/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj b/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj index 7d335d3..788bc92 100644 --- a/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj +++ b/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj @@ -1,14 +1,14 @@ - netcoreapp3.1 + net8.0 false - - - - + + + + all runtime; build; native; contentfiles; analyzers diff --git a/src/LittleBlocks.Excel.ClosedXml/DataSheetCell.cs b/src/LittleBlocks.Excel.ClosedXml/DataSheetCell.cs index 1c39a42..4a32fe5 100644 --- a/src/LittleBlocks.Excel.ClosedXml/DataSheetCell.cs +++ b/src/LittleBlocks.Excel.ClosedXml/DataSheetCell.cs @@ -112,7 +112,7 @@ public Guid GetGuidMandatory() public object Value { get => _cell.Value; - set => _cell.Value = value; + set => _cell.Value = (XLCellValue)value; } public bool IsEmpty() diff --git a/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj b/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj index 1fc227b..80e262f 100644 --- a/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj +++ b/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + net8.0 true Mohammad Moattar, Justin French, Aurimas Gecas ICG @@ -8,10 +8,10 @@ https://github.com/LittleBlocks/LittleBlocks.Excel - - - - + + + + diff --git a/src/LittleBlocks.Excel.ClosedXml/WorkbookLoader.cs b/src/LittleBlocks.Excel.ClosedXml/WorkbookLoader.cs index c2c8e87..f5f85d5 100644 --- a/src/LittleBlocks.Excel.ClosedXml/WorkbookLoader.cs +++ b/src/LittleBlocks.Excel.ClosedXml/WorkbookLoader.cs @@ -40,7 +40,7 @@ public IWorkbook Load(string path) var fileName = Path.GetFileName(path); var stream = FileHelper.ReadFileToMemoryStream(path); - return new Workbook(new XLWorkbook(stream, XLEventTracking.Disabled), fileName); + return new Workbook(new XLWorkbook(stream), fileName); } catch (FileFormatException ex) { @@ -54,7 +54,7 @@ public IWorkbook Load(Stream stream) { if (stream == null) throw new ArgumentNullException(nameof(stream)); - return new Workbook(new XLWorkbook(stream, XLEventTracking.Disabled)); + return new Workbook(new XLWorkbook(stream)); } } } \ No newline at end of file diff --git a/src/LittleBlocks.Excel.Extensions/LittleBlocks.Excel.Extensions.csproj b/src/LittleBlocks.Excel.Extensions/LittleBlocks.Excel.Extensions.csproj index 720ac3a..0ae47c2 100644 --- a/src/LittleBlocks.Excel.Extensions/LittleBlocks.Excel.Extensions.csproj +++ b/src/LittleBlocks.Excel.Extensions/LittleBlocks.Excel.Extensions.csproj @@ -1,6 +1,6 @@ - netstandard2.0 + net8.0 true Justin French / Aurimas Gecas ICG @@ -8,7 +8,7 @@ https://github.com/LittleBlocks/LittleBlocks.Excel - + diff --git a/src/LittleBlocks.Excel.SampleApp/LittleBlocks.Excel.SampleApp.csproj b/src/LittleBlocks.Excel.SampleApp/LittleBlocks.Excel.SampleApp.csproj index 9f095ce..22a451d 100644 --- a/src/LittleBlocks.Excel.SampleApp/LittleBlocks.Excel.SampleApp.csproj +++ b/src/LittleBlocks.Excel.SampleApp/LittleBlocks.Excel.SampleApp.csproj @@ -1,12 +1,12 @@  Exe - netcoreapp3.1 + net8.0 - - - + + + diff --git a/src/LittleBlocks.Excel.SampleApp/Program.cs b/src/LittleBlocks.Excel.SampleApp/Program.cs index b80a969..3bc548d 100644 --- a/src/LittleBlocks.Excel.SampleApp/Program.cs +++ b/src/LittleBlocks.Excel.SampleApp/Program.cs @@ -67,7 +67,7 @@ private static void ConfigureServices(IServiceCollection services) private static IWorkbook LoadWorkbook(string dataFile) { var datafilePath = $"{AppDomain.CurrentDomain.BaseDirectory}\\data\\{dataFile}"; - var workbook = new XLWorkbook(GetMemoryStream(datafilePath), XLEventTracking.Disabled); + var workbook = new XLWorkbook(GetMemoryStream(datafilePath)); var fileName = Path.GetFileName(datafilePath); return new Workbook(workbook, fileName); } diff --git a/src/LittleBlocks.Excel.UnitTests/LittleBlocks.Excel.UnitTests.csproj b/src/LittleBlocks.Excel.UnitTests/LittleBlocks.Excel.UnitTests.csproj index 8d3259d..3f29e1b 100644 --- a/src/LittleBlocks.Excel.UnitTests/LittleBlocks.Excel.UnitTests.csproj +++ b/src/LittleBlocks.Excel.UnitTests/LittleBlocks.Excel.UnitTests.csproj @@ -1,13 +1,13 @@ - netcoreapp3.1 + net8.0 false - - - - + + + + all runtime; build; native; contentfiles; analyzers diff --git a/src/LittleBlocks.Excel/LittleBlocks.Excel.csproj b/src/LittleBlocks.Excel/LittleBlocks.Excel.csproj index dfc500c..3cd6f53 100644 --- a/src/LittleBlocks.Excel/LittleBlocks.Excel.csproj +++ b/src/LittleBlocks.Excel/LittleBlocks.Excel.csproj @@ -1,6 +1,6 @@  - netstandard2.0 + net8.0 Mohammad Moattar, Justin French, Aurimas Gecas ICG Abstraction & Fluent API for loading and manipulating excel OpenDocument format. @@ -8,7 +8,7 @@ https://github.com/LittleBlocks/LittleBlocks.Excel - - + + From acd140a629b93d5969d2d0db52cd94b114de6f3b Mon Sep 17 00:00:00 2001 From: LewisP Date: Thu, 11 Apr 2024 14:16:35 +0100 Subject: [PATCH 2/5] version --- GitVersion.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GitVersion.yml b/GitVersion.yml index 8396552..7b0bbb4 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,9 +1,7 @@ -next-version: 1.0.3 +next-version: 2.0.0 mode: Mainline major-version-bump-message: '\+semver:\s?(breaking|major)' minor-version-bump-message: '\+semver:\s?(feature|minor)' patch-version-bump-message: '\+semver:\s?(fix|patch)' no-bump-message: '\+semver:\s?(none|skip)' -ignore: - commits-before: 2023-01-01T00:00:00 # what is this for? should it be removed? From ded2fcf9a5e6f00537fc571a1cd21be265066049 Mon Sep 17 00:00:00 2001 From: LewisP Date: Thu, 11 Apr 2024 15:11:58 +0100 Subject: [PATCH 3/5] update the workflows tests will fail next --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d048395..ca3c8ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: "3.1.x" + dotnet-version: "8.0.x" - name: Install dependencies run: dotnet restore src - name: Use GitVersion diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1308177..f733820 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: "3.1.x" + dotnet-version: "8.0.x" - name: Install dependencies run: dotnet restore src - name: Use GitVersion From e0c08fb3385b9de012ec6897d298b09bad7c6d98 Mon Sep 17 00:00:00 2001 From: LewisP Date: Tue, 16 Apr 2024 14:09:48 +0100 Subject: [PATCH 4/5] closed xml next major version breaks our tests --- .../LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj | 2 +- .../LittleBlocks.Excel.ClosedXml.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj b/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj index 788bc92..5ccf47f 100644 --- a/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj +++ b/src/LittleBlocks.Excel.ClosedXml.IntegrationTests/LittleBlocks.Excel.ClosedXml.IntegrationTests.csproj @@ -4,7 +4,7 @@ false - + diff --git a/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj b/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj index 80e262f..18c6c63 100644 --- a/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj +++ b/src/LittleBlocks.Excel.ClosedXml/LittleBlocks.Excel.ClosedXml.csproj @@ -9,7 +9,7 @@ - + From 661f684cbbc77b29f7b1ca5a894f349ea2dcf1cf Mon Sep 17 00:00:00 2001 From: LewisP Date: Tue, 16 Apr 2024 14:15:15 +0100 Subject: [PATCH 5/5] fix git version --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca3c8ab..76f6e04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,9 @@ jobs: - name: Install GitVersion uses: gittools/actions/gitversion/setup@v0.9.7 with: - versionSpec: "5.5.x" + versionSpec: "5.8.x" - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v2 with: dotnet-version: "8.0.x" - name: Install dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f733820..35cde92 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,9 +16,9 @@ jobs: - name: Install GitVersion uses: gittools/actions/gitversion/setup@v0.9.7 with: - versionSpec: "5.5.x" + versionSpec: "5.8.x" - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v2 with: dotnet-version: "8.0.x" - name: Install dependencies