diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c14974c..b15894b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,6 +13,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '9.0.x' - name: Install workloads run: dotnet workload install maui diff --git a/src/apps/H.NotifyIcon.Apps.Console/H.NotifyIcon.Apps.Console.csproj b/src/apps/H.NotifyIcon.Apps.Console/H.NotifyIcon.Apps.Console.csproj index 09e642f..1971109 100644 --- a/src/apps/H.NotifyIcon.Apps.Console/H.NotifyIcon.Apps.Console.csproj +++ b/src/apps/H.NotifyIcon.Apps.Console/H.NotifyIcon.Apps.Console.csproj @@ -1,7 +1,7 @@ - net4.8;net8.0-windows + net4.8;net9.0-windows Exe preview enable diff --git a/src/apps/H.NotifyIcon.Apps.Maui/App.xaml.cs b/src/apps/H.NotifyIcon.Apps.Maui/App.xaml.cs index 6f2ad0a..295f1ea 100644 --- a/src/apps/H.NotifyIcon.Apps.Maui/App.xaml.cs +++ b/src/apps/H.NotifyIcon.Apps.Maui/App.xaml.cs @@ -5,7 +5,10 @@ public partial class App : Application public App() { InitializeComponent(); - - MainPage = new AppShell(); } + + protected override Window CreateWindow(IActivationState? activationState) + { + return new Window(new AppShell()); + } } diff --git a/src/apps/H.NotifyIcon.Apps.Maui/H.NotifyIcon.Apps.Maui.csproj b/src/apps/H.NotifyIcon.Apps.Maui/H.NotifyIcon.Apps.Maui.csproj index f566cc9..c3a546f 100644 --- a/src/apps/H.NotifyIcon.Apps.Maui/H.NotifyIcon.Apps.Maui.csproj +++ b/src/apps/H.NotifyIcon.Apps.Maui/H.NotifyIcon.Apps.Maui.csproj @@ -1,10 +1,10 @@ - $(TargetFrameworks);net8.0-maccatalyst - $(TargetFrameworks);net8.0-windows10.0.19041.0 + $(TargetFrameworks);net9.0-maccatalyst + $(TargetFrameworks);net9.0-windows10.0.19041.0 - + enable @@ -15,6 +15,7 @@ + diff --git a/src/libs/H.GeneratedIcons.SkiaSharp/H.GeneratedIcons.SkiaSharp.csproj b/src/libs/H.GeneratedIcons.SkiaSharp/H.GeneratedIcons.SkiaSharp.csproj index fffd002..6fd8764 100644 --- a/src/libs/H.GeneratedIcons.SkiaSharp/H.GeneratedIcons.SkiaSharp.csproj +++ b/src/libs/H.GeneratedIcons.SkiaSharp/H.GeneratedIcons.SkiaSharp.csproj @@ -1,7 +1,7 @@ - net4.6.2;netstandard2.0;net6.0;net8.0 + net4.6.2;netstandard2.0;net8.0;net9.0 @@ -9,7 +9,7 @@ - + diff --git a/src/libs/H.GeneratedIcons.SkiaSharp/SkiaSharpIconGenerator.cs b/src/libs/H.GeneratedIcons.SkiaSharp/SkiaSharpIconGenerator.cs index c89dc7c..64e39e4 100644 --- a/src/libs/H.GeneratedIcons.SkiaSharp/SkiaSharpIconGenerator.cs +++ b/src/libs/H.GeneratedIcons.SkiaSharp/SkiaSharpIconGenerator.cs @@ -129,8 +129,7 @@ public static SKBitmap Generate( { if (textRectangle == null) { - var bounds = new SKRect(); - _ = foregroundBrush.MeasureText(text, ref bounds); + _ = font.MeasureText(text, out var bounds, foregroundBrush); graphics.DrawText( text: text, diff --git a/src/libs/H.GeneratedIcons.System.Drawing/H.GeneratedIcons.System.Drawing.csproj b/src/libs/H.GeneratedIcons.System.Drawing/H.GeneratedIcons.System.Drawing.csproj index 38d8f02..502ef37 100644 --- a/src/libs/H.GeneratedIcons.System.Drawing/H.GeneratedIcons.System.Drawing.csproj +++ b/src/libs/H.GeneratedIcons.System.Drawing/H.GeneratedIcons.System.Drawing.csproj @@ -1,22 +1,18 @@ - net4.6.2;netstandard2.0;net6.0;net8.0 + net4.6.2;netstandard2.0;net8.0;net9.0 - - - - - + - + diff --git a/src/libs/H.NotifyIcon.Maui/H.NotifyIcon.Maui.csproj b/src/libs/H.NotifyIcon.Maui/H.NotifyIcon.Maui.csproj index 995a567..8466667 100644 --- a/src/libs/H.NotifyIcon.Maui/H.NotifyIcon.Maui.csproj +++ b/src/libs/H.NotifyIcon.Maui/H.NotifyIcon.Maui.csproj @@ -1,17 +1,17 @@ - net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041.0 + net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041.0 true $(DefineConstants);HAS_PLATFORM_CODE;HAS_MAUI - $(DefineConstants);HAS_MAUI_WINUI + $(DefineConstants);HAS_MAUI_WINUI $(NoWarn);CA1031;CS8002;CS0108;CA1501;CA1513 true - 11.0 - 13.1 + 12.2 + 15.0 21.0 10.0.17763.0 10.0.17763.0 @@ -40,7 +40,6 @@ popups, context menus, and balloon messages. It can be used directly in code or - diff --git a/src/libs/H.NotifyIcon.Uno.WinUI/H.NotifyIcon.Uno.WinUI.csproj b/src/libs/H.NotifyIcon.Uno.WinUI/H.NotifyIcon.Uno.WinUI.csproj index d8a45f9..ecaea78 100644 --- a/src/libs/H.NotifyIcon.Uno.WinUI/H.NotifyIcon.Uno.WinUI.csproj +++ b/src/libs/H.NotifyIcon.Uno.WinUI/H.NotifyIcon.Uno.WinUI.csproj @@ -11,14 +11,6 @@ true - - - - - - - - This is an implementation of a NotifyIcon (aka system tray icon or taskbar icon) for the Uno.WinUI Skia.Wpf platform. It does not just rely on the Windows Forms NotifyIcon component, @@ -43,4 +35,26 @@ popups, context menus, and balloon messages. It can be used directly in code or + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/libs/H.NotifyIcon.Uno/H.NotifyIcon.Uno.csproj b/src/libs/H.NotifyIcon.Uno/H.NotifyIcon.Uno.csproj index bfccf67..4fde847 100644 --- a/src/libs/H.NotifyIcon.Uno/H.NotifyIcon.Uno.csproj +++ b/src/libs/H.NotifyIcon.Uno/H.NotifyIcon.Uno.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/libs/H.NotifyIcon.WinUI/H.NotifyIcon.WinUI.csproj b/src/libs/H.NotifyIcon.WinUI/H.NotifyIcon.WinUI.csproj index 0776bcd..a22d325 100644 --- a/src/libs/H.NotifyIcon.WinUI/H.NotifyIcon.WinUI.csproj +++ b/src/libs/H.NotifyIcon.WinUI/H.NotifyIcon.WinUI.csproj @@ -1,7 +1,7 @@ - net8.0-windows10.0.17763.0 + net8.0-windows10.0.17763.0;net8.0-windows10.0.17763.0 true $(DefineConstants);HAS_WINUI;IS_PACKABLE;HAS_PLATFORM_CODE $(NoWarn);CS3021;CA1031;CS8002;CA1513;NETSDK1206 @@ -11,7 +11,9 @@ - + + + diff --git a/src/libs/H.NotifyIcon.Wpf/H.NotifyIcon.Wpf.csproj b/src/libs/H.NotifyIcon.Wpf/H.NotifyIcon.Wpf.csproj index 4254926..703757a 100644 --- a/src/libs/H.NotifyIcon.Wpf/H.NotifyIcon.Wpf.csproj +++ b/src/libs/H.NotifyIcon.Wpf/H.NotifyIcon.Wpf.csproj @@ -1,7 +1,7 @@ - net4.6.2;net6.0-windows;net8.0-windows + net4.6.2;net8.0-windows;net9.0-windows true $(DefineConstants);HAS_WPF;HAS_PLATFORM_CODE Hardcodet.Wpf.TaskbarNotification diff --git a/src/libs/H.NotifyIcon/H.NotifyIcon.csproj b/src/libs/H.NotifyIcon/H.NotifyIcon.csproj index e4759fb..9c623c6 100644 --- a/src/libs/H.NotifyIcon/H.NotifyIcon.csproj +++ b/src/libs/H.NotifyIcon/H.NotifyIcon.csproj @@ -1,7 +1,7 @@  - net4.6.2;netstandard2.0;net6.0;net8.0 + net4.6.2;netstandard2.0;net8.0;net9.0 $(NoWarn);CA1031;CA1003;CA1502;CS3016;CS8981;CA1513 diff --git a/src/tests/H.NotifyIcon.IntegrationTests/H.NotifyIcon.IntegrationTests.csproj b/src/tests/H.NotifyIcon.IntegrationTests/H.NotifyIcon.IntegrationTests.csproj index 4f5fccf..7472cc7 100644 --- a/src/tests/H.NotifyIcon.IntegrationTests/H.NotifyIcon.IntegrationTests.csproj +++ b/src/tests/H.NotifyIcon.IntegrationTests/H.NotifyIcon.IntegrationTests.csproj @@ -1,14 +1,12 @@ - net4.8;net8.0-windows + net4.8;net9.0-windows true - - - +