Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and deprecate target frameworks #90

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ jobs:
with:
dotnet-version: |
6.x
7.x
8.x
9.x
dotnet-quality: 'preview'
- name: Setup .NET workload maui-android
run: dotnet workload install maui-android
- name: Setup .NET workload maui-windows
Expand Down Expand Up @@ -140,8 +141,9 @@ jobs:
with:
dotnet-version: |
6.x
7.x
8.x
9.x
dotnet-quality: 'preview'
- name: Download test project MonoConsole
uses: actions/download-artifact@main
with:
Expand Down Expand Up @@ -173,12 +175,12 @@ jobs:
- name: .NET 6
if: success() || failure()
run: dotnet test net6.0/*.Tests.dll --logger trx --verbosity detailed --results-directory "${{ matrix.os }}/TestResults" ${{ (github.event_name == 'workflow_dispatch' && inputs.generate_assets) == true && '--settings net6.0/SaveOutputInGeneratedFolder.runsettings' || '' }}
- name: .NET 7
if: success() || failure()
run: dotnet test net7.0/*.Tests.dll --logger trx --verbosity detailed --results-directory "${{ matrix.os }}/TestResults" ${{ (github.event_name == 'workflow_dispatch' && inputs.generate_assets) == true && '--settings net8.0/SaveOutputInGeneratedFolder.runsettings' || '' }}
- name: .NET 8
if: success() || failure()
run: dotnet test net8.0/*.Tests.dll --logger trx --verbosity detailed --results-directory "${{ matrix.os }}/TestResults" ${{ (github.event_name == 'workflow_dispatch' && inputs.generate_assets) == true && '--settings net8.0/SaveOutputInGeneratedFolder.runsettings' || '' }}
- name: .NET 9
if: success() || failure()
run: dotnet test net9.0/*.Tests.dll --logger trx --verbosity detailed --results-directory "${{ matrix.os }}/TestResults" ${{ (github.event_name == 'workflow_dispatch' && inputs.generate_assets) == true && '--settings net9.0/SaveOutputInGeneratedFolder.runsettings' || '' }}
- name: Upload test results
if: success() || failure()
uses: actions/upload-artifact@main
Expand Down Expand Up @@ -286,8 +288,9 @@ jobs:
with:
dotnet-version: |
6.x
7.x
8.x
9.x
dotnet-quality: 'preview'
- name: Setup .NET workload maui-android
run: dotnet workload install maui-android
- name: Setup dotnet-coverage
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/githubpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: 8.x
dotnet-version: 9.x
dotnet-quality: 'preview'
- name: Setup .NET workload maui-android
run: dotnet workload install maui-android
- name: Setup .NET workload wasm-tools
Expand All @@ -38,9 +39,9 @@ jobs:
- name: Publish
run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml -p:VersionSuffix=ci --no-restore
- name: Create .nojekyll file
run: touch src/WebConverter/bin/Release/net8.0/publish/wwwroot/.nojekyll
run: touch src/WebConverter/bin/Release/net9.0/publish/wwwroot/.nojekyll
- name: Update service-worker-assets.js hashes
working-directory: src/WebConverter/bin/Release/net8.0/publish/wwwroot
working-directory: src/WebConverter/bin/Release/net9.0/publish/wwwroot
if: false
run: |
jsFile=$(<service-worker-assets.js)
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
- name: Upload pages artifact
uses: actions/upload-pages-artifact@main
with:
path: src/WebConverter/bin/Release/net8.0/publish/wwwroot
path: src/WebConverter/bin/Release/net9.0/publish/wwwroot
deploy:
name: Deploy
needs: publish
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/githubpages_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
dotnet-version: 8.x
dotnet-version: 9.x
dotnet-quality: 'preview'
- name: Setup .NET workload maui-android
run: dotnet workload install maui-android
- name: Setup .NET workload wasm-tools
Expand All @@ -39,9 +40,9 @@ jobs:
- name: Publish
run: dotnet publish src/WebConverter/WebConverter.csproj -c Release -p:PublishProfile=src/WebConverter/Properties/PublishProfiles/PublishSite.pubxml -p:VersionSuffix=ci --no-restore
- name: Create .nojekyll file
run: touch src/WebConverter/bin/Release/net8.0/publish/wwwroot/.nojekyll
run: touch src/WebConverter/bin/Release/net9.0/publish/wwwroot/.nojekyll
- name: Update service-worker-assets.js hashes
working-directory: src/WebConverter/bin/Release/net8.0/publish/wwwroot
working-directory: src/WebConverter/bin/Release/net9.0/publish/wwwroot
if: false
run: |
jsFile=$(<service-worker-assets.js)
Expand Down Expand Up @@ -73,7 +74,7 @@ jobs:
- name: Upload pages artifact
uses: actions/upload-pages-artifact@main
with:
path: src/WebConverter/bin/Release/net8.0/publish/wwwroot
path: src/WebConverter/bin/Release/net9.0/publish/wwwroot
deploy:
name: Deploy
needs: publish
Expand All @@ -97,4 +98,4 @@ jobs:
id: deployment
uses: actions/deploy-pages@main
with:
preview: true
preview: true
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,6 @@ Call a static method from `PDFtoImage.Conversion`:
https://github.com/sungaila/PDFtoImage.git?path=etc/UnityPackage
```

## Breaking changes in v4.0.0
Starting with v4.0.0 the struct `RenderOptions` is used for most methods. This is a breaking change when updating from v3.1.0 and older.
### Option 1: Migrate to new API
```csharp
// this will not compile anymore
PDFtoImage.Conversion.SaveJpeg("image.jpg", pdfStream, dpi: 300, rotation: PdfRotation.Rotate90);

// use this instead
PDFtoImage.Conversion.SaveJpeg("image.jpg", pdfStream, options: new(Dpi: 300, Rotation: PdfRotation.Rotate90));
```
### Option 2: Change namespace
Note: This namespace is used for backward compatibility and will be removed in a future version.
```csharp
using PDFtoImage;
using Conversion = PDFtoImage.Compatibility.Conversion;
```

## Supported runtimes
* [.NET (Core)](https://learn.microsoft.com/en-us/dotnet/core/introduction)
* [.NET Framework](https://learn.microsoft.com/en-us/dotnet/framework/get-started/overview)
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Console.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Assembly -->
<PropertyGroup>
<TargetFrameworks>net462;net471;net481;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;net471;net481;net6.0;net8.0;net9.0</TargetFrameworks>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<OutputType>Exe</OutputType>
<AssemblyName>PDFtoImage.Console</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion src/FrameworkTests/AotConsole/AotConsole.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0 AS base
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-preview AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-noble-chiseled AS base
FROM mcr.microsoft.com/dotnet/runtime-deps:9.0-preview-noble-chiseled AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0-noble-chiseled AS base
FROM mcr.microsoft.com/dotnet/runtime:9.0-preview-noble-chiseled AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
6 changes: 3 additions & 3 deletions src/FrameworkTests/AotConsole/Dockerfiles/ubuntu.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
FROM mcr.microsoft.com/dotnet/runtime:9.0-preview AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview-windowsservercore-ltsc2022 AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0-nanoserver-ltsc2022 AS base
FROM mcr.microsoft.com/dotnet/runtime:9.0-preview-nanoserver-ltsc2022 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview-windowsservercore-ltsc2022 AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/windows/servercore:ltsc2022
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview-windowsservercore-ltsc2022 AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0-windowsservercore-ltsc2022 AS base
FROM mcr.microsoft.com/dotnet/runtime:9.0-preview-windowsservercore-ltsc2022 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022 AS restore
FROM mcr.microsoft.com/dotnet/sdk:9.0-preview-windowsservercore-ltsc2022 AS restore
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/FrameworkTests/AotConsole/AotConsole.csproj", "src/FrameworkTests/AotConsole/AotConsole.csproj"]
COPY ["src/PDFtoImage", "src/PDFtoImage"]
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net8.0
RUN dotnet restore "./src/FrameworkTests/AotConsole/AotConsole.csproj" /p:TargetFramework=net9.0
COPY . .
WORKDIR "/src/src"

Expand Down
2 changes: 1 addition & 1 deletion src/FrameworkTests/AspNetCore/AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyName>PDFtoImage.FrameworkTests.AspNetCore</AssemblyName>
Expand Down
13 changes: 7 additions & 6 deletions src/FrameworkTests/MauiApp/MauiApp.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0-android</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net9.0-android</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>PDFtoImage.FrameworkTests.MauiApp</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -28,6 +28,7 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>

<ItemGroup>
Expand All @@ -49,9 +50,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.70" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.70" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0-preview.7.24405.7" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.0-preview.7.24407.4" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.0-preview.7.24407.4" />
</ItemGroup>

<ItemGroup>
Expand Down
19 changes: 0 additions & 19 deletions src/FrameworkTests/MonoAndroid/Assets/AboutAssets.txt

This file was deleted.

Loading
Loading