Skip to content

Commit 2d8899c

Browse files
committed
Release v2.0.0 - Add .NET 8 and 9 support
1 parent 80268da commit 2d8899c

21 files changed

+84
-20
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
type=ref,event=tag
3737
type=sha,prefix={{branch}}-
3838
type=raw,value=latest
39-
type=raw,value=preview-10.0
39+
type=raw,value=net8-9-10
4040
4141
- name: Build and push Docker image
4242
uses: docker/build-push-action@v5

.github/workflows/nuget-publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22-
- name: Setup .NET 10 Preview
22+
- name: Setup .NET SDKs
2323
uses: actions/setup-dotnet@v4
2424
with:
25-
dotnet-version: '10.0.x'
25+
dotnet-version: |
26+
8.0.x
27+
9.0.x
28+
10.0.x
2629
2730
- name: Install OCR dependencies
2831
run: |

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17-
- name: Setup .NET 10 Preview
17+
- name: Setup .NET SDKs
1818
uses: actions/setup-dotnet@v4
1919
with:
20-
dotnet-version: '10.0.x'
20+
dotnet-version: |
21+
8.0.x
22+
9.0.x
23+
10.0.x
2124
2225
- name: Install OCR dependencies
2326
run: |

CreatePdf.NET.Tests/CreatePdf.NET.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
4+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>

CreatePdf.NET.Tests/FileOperationsTests.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,31 @@ public void GetOutputPath_WithLongFilename_PreservesFullName(string input, strin
204204

205205
Path.GetFileName(result).Should().Be(expectedFilename);
206206
}
207+
208+
[Fact]
209+
public void GetOutputPath_FromDeepBinDirectory_CreatesOutputInProjectRoot()
210+
{
211+
var result = FileOperations.GetOutputPath("test.pdf");
212+
213+
result.Should().Contain("output");
214+
215+
result.Should().NotContain("bin/Debug");
216+
result.Should().NotContain("bin/Release");
217+
218+
var outputDir = Path.GetDirectoryName(result);
219+
Directory.Exists(outputDir).Should().BeTrue();
220+
221+
var pathSegments = result.Split(Path.DirectorySeparatorChar);
222+
pathSegments.Should().NotContain("net8.0");
223+
pathSegments.Should().NotContain("net9.0");
224+
pathSegments.Should().NotContain("net10.0");
225+
}
226+
227+
[Fact]
228+
public void FindProjectRoot_WhenNoProjectFiles_ReturnsNull()
229+
{
230+
var result = FileOperations.FindProjectRoot(Path.GetTempPath());
231+
232+
result.Should().BeNull();
233+
}
207234
}
83 KB
Binary file not shown.
83 KB
Binary file not shown.
83 KB
Binary file not shown.
770 Bytes
Binary file not shown.
770 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)