From 1087dd9b6ca4c63d7a1a230e7d5d7e347987d167 Mon Sep 17 00:00:00 2001 From: tobitege <10787084+tobitege@users.noreply.github.com> Date: Sun, 7 Jun 2026 08:01:45 +0200 Subject: [PATCH 1/2] Upgrade to Avalonia 12 and dependency updates Bump the app version to 0.3.0 and document the release in CHANGELOG.md. Update Avalonia, Flowery.NET, MSTest, and other eligible direct NuGet dependencies that were older than the seven-day security cutoff. Adjust the application for Avalonia 12 API changes by moving placeholder usage to PlaceholderText, restoring clipboard text helpers through the new extension namespace, updating fullscreen window decoration settings, and preserving duplicate validation-plugin removal through reflection because the binding plugin container is no longer public. Update exception assertion tests for the MSTest 4 assertion API. Refs #4 --- CHANGELOG.md | 15 ++++++ .../OpenSourceToolkit.AI.csproj | 4 +- .../OpenSourceToolkit.Converters.csproj | 10 ++-- .../OpenSourceToolkit.Hardware.csproj | 4 +- .../OpenSourceToolkit.Media.csproj | 4 +- OpenSourceToolkit.NET/App.axaml.cs | 23 ++++++--- .../Controls/CopyableInput.axaml | 4 +- .../Controls/CopyableInput.axaml.cs | 3 +- .../Controls/CopyableTextBox.axaml | 4 +- .../Controls/CopyableTextBox.axaml.cs | 3 +- .../Controls/DragDropTextBox.axaml | 4 +- .../Controls/LineNumberTextBox.axaml | 4 +- .../Controls/NumericEntry.axaml | 4 +- .../OpenSourceToolkit.NET.csproj | 34 ++++++------- .../Views/SettingsWindow.axaml | 14 +++--- .../Views/Tools/ApiTesterToolView.axaml | 10 ++-- .../Views/Tools/AsciiArtToolView.axaml | 4 +- .../Views/Tools/AsciiArtToolView.axaml.cs | 3 +- .../Views/Tools/Base64ToolView.axaml | 2 +- .../Tools/ClipboardImageSaverToolView.axaml | 6 +-- .../Views/Tools/ColorToolView.axaml | 4 +- .../Views/Tools/ColorToolView.axaml.cs | 3 +- .../Views/Tools/CronToolView.axaml | 4 +- .../Views/Tools/DiffCheckerToolView.axaml | 6 +-- .../Views/Tools/DnsToolView.axaml | 4 +- .../Tools/FinancialCalculatorToolView.axaml | 50 +++++++++---------- .../Views/Tools/FolderAnalyzerToolView.axaml | 4 +- .../Views/Tools/FontsViewerToolView.axaml | 6 +-- .../Views/Tools/FontsViewerToolView.axaml.cs | 3 +- .../Views/Tools/HashToolView.axaml | 2 +- .../Views/Tools/HmacToolView.axaml | 6 +-- .../ImageConverter/AiAssistantPanel.axaml | 4 +- .../ImageConverter/BatchConvertPanel.axaml | 10 ++-- .../HorizontalToolOptionsBar.axaml | 10 ++-- .../Tools/ImageConverterToolView.axaml.cs | 4 +- .../Views/Tools/ImageFullscreenViewer.axaml | 5 +- .../Views/Tools/IpLocationToolView.axaml | 4 +- .../Views/Tools/JwtToolView.axaml | 2 +- .../Views/Tools/KeyboardTesterToolView.axaml | 4 +- .../Views/Tools/MarkdownEditorToolView.axaml | 2 +- .../Views/Tools/PdfToolView.axaml | 14 +++--- .../Views/Tools/PdfToolView.axaml.cs | 4 +- .../Views/Tools/PrivacyPolicyToolView.axaml | 8 +-- .../Views/Tools/QrCodeToolView.axaml | 4 +- .../Views/Tools/QrCodeToolView.axaml.cs | 3 +- .../ScientificCalculatorToolView.axaml.cs | 3 +- .../Views/Tools/SqlFormatterToolView.axaml | 4 +- .../Views/Tools/SqlFormatterToolView.axaml.cs | 3 +- .../Views/Tools/TextCaseToolView.axaml | 2 +- .../Views/Tools/ThemeTestingToolView.axaml | 10 ++-- .../Views/Tools/UptimeToolView.axaml | 4 +- .../Views/Tools/UuidToolView.axaml.cs | 3 +- .../Views/Tools/VCardGeneratorToolView.axaml | 26 +++++----- .../OpenSourceToolkit.Security.csproj | 2 +- OpenSourceToolkit.Tests/ConverterTests.cs | 4 +- OpenSourceToolkit.Tests/IoTests.cs | 5 +- OpenSourceToolkit.Tests/MediaTests.cs | 6 +-- .../OpenSourceToolkit.Tests.csproj | 8 +-- OpenSourceToolkit.Tests/SchedulingTests.cs | 8 ++- 59 files changed, 222 insertions(+), 195 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd80776..1029c02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.0] - 2026-06-07 + +### Changed + +- Upgraded the desktop app to Avalonia 12 and Flowery.NET 2.0.6. +- Updated eligible direct NuGet dependencies that were older than seven days, including OpenCvSharp, SkiaSharp, System.Text.Json, System.Drawing.Common, YamlDotNet, LlmTornado, Microsoft.SqlServer.TransactSql.ScriptDom, and MSTest packages. +- Replaced deprecated Avalonia placeholder APIs across the UI with `PlaceholderText`. +- Updated fullscreen image viewer window chrome settings for Avalonia 12. +- Updated MSTest exception assertions for the MSTest 4 assertion API. + +### Fixed + +- Restored text clipboard copy behavior after Avalonia 12 moved clipboard text helpers to extension methods. +- Preserved duplicate validation-plugin removal behavior after Avalonia 12 made the binding plugin container non-public. + ## [0.2.3] - 2026-05-18 ### Security diff --git a/OpenSourceToolkit.AI/OpenSourceToolkit.AI.csproj b/OpenSourceToolkit.AI/OpenSourceToolkit.AI.csproj index dea2bbe..8cc3ccb 100644 --- a/OpenSourceToolkit.AI/OpenSourceToolkit.AI.csproj +++ b/OpenSourceToolkit.AI/OpenSourceToolkit.AI.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -15,7 +15,7 @@ - + diff --git a/OpenSourceToolkit.Converters/OpenSourceToolkit.Converters.csproj b/OpenSourceToolkit.Converters/OpenSourceToolkit.Converters.csproj index ce48af9..ac37288 100644 --- a/OpenSourceToolkit.Converters/OpenSourceToolkit.Converters.csproj +++ b/OpenSourceToolkit.Converters/OpenSourceToolkit.Converters.csproj @@ -6,11 +6,11 @@ - - - - - + + + + + diff --git a/OpenSourceToolkit.Hardware/OpenSourceToolkit.Hardware.csproj b/OpenSourceToolkit.Hardware/OpenSourceToolkit.Hardware.csproj index 46f2bf5..fd7f69c 100644 --- a/OpenSourceToolkit.Hardware/OpenSourceToolkit.Hardware.csproj +++ b/OpenSourceToolkit.Hardware/OpenSourceToolkit.Hardware.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/OpenSourceToolkit.Media/OpenSourceToolkit.Media.csproj b/OpenSourceToolkit.Media/OpenSourceToolkit.Media.csproj index a4ae7ff..6f653b4 100644 --- a/OpenSourceToolkit.Media/OpenSourceToolkit.Media.csproj +++ b/OpenSourceToolkit.Media/OpenSourceToolkit.Media.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/OpenSourceToolkit.NET/App.axaml.cs b/OpenSourceToolkit.NET/App.axaml.cs index 797cf21..8e94ce1 100644 --- a/OpenSourceToolkit.NET/App.axaml.cs +++ b/OpenSourceToolkit.NET/App.axaml.cs @@ -1,13 +1,12 @@ -#nullable enable +#nullable enable using Avalonia; using Avalonia.Controls.ApplicationLifetimes; -using Avalonia.Data.Core; -using Avalonia.Data.Core.Plugins; using Avalonia.Media; using Avalonia.Styling; using System; using System.Globalization; using System.Linq; +using System.Reflection; using System.Threading.Tasks; using Avalonia.Markup.Xaml; using Avalonia.Threading; @@ -286,14 +285,22 @@ public static bool ApplyThemeInPlace(string themeName, bool saveToSettings = tru private void DisableAvaloniaDataAnnotationValidation() { - // Get an array of plugins to remove - var dataValidationPluginsToRemove = - BindingPlugins.DataValidators.OfType().ToArray(); + var bindingPluginsType = typeof(Application).Assembly.GetType("Avalonia.Data.Core.Plugins.BindingPlugins"); + var dataValidatorsProperty = bindingPluginsType?.GetProperty( + "DataValidators", + BindingFlags.Static | BindingFlags.Public); + var dataValidators = dataValidatorsProperty?.GetValue(null) as System.Collections.IList; + if (dataValidators == null) + return; + + var dataValidationPluginsToRemove = dataValidators + .Cast() + .Where(plugin => plugin.GetType().FullName == "Avalonia.Data.Core.Plugins.DataAnnotationsValidationPlugin") + .ToArray(); - // remove each entry found foreach (var plugin in dataValidationPluginsToRemove) { - BindingPlugins.DataValidators.Remove(plugin); + dataValidators.Remove(plugin); } } diff --git a/OpenSourceToolkit.NET/Controls/CopyableInput.axaml b/OpenSourceToolkit.NET/Controls/CopyableInput.axaml index b07e67e..0f27e8d 100644 --- a/OpenSourceToolkit.NET/Controls/CopyableInput.axaml +++ b/OpenSourceToolkit.NET/Controls/CopyableInput.axaml @@ -1,4 +1,4 @@ - diff --git a/OpenSourceToolkit.NET/Controls/CopyableInput.axaml.cs b/OpenSourceToolkit.NET/Controls/CopyableInput.axaml.cs index 09a1165..2edb1f4 100644 --- a/OpenSourceToolkit.NET/Controls/CopyableInput.axaml.cs +++ b/OpenSourceToolkit.NET/Controls/CopyableInput.axaml.cs @@ -1,6 +1,7 @@ -using Avalonia; +using Avalonia; using Avalonia.Controls; using Avalonia.Data; +using Avalonia.Input.Platform; namespace OpenSourceToolkit.NET.Controls { diff --git a/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml b/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml index ffb3da8..071640a 100644 --- a/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml +++ b/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml @@ -1,4 +1,4 @@ - diff --git a/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml.cs b/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml.cs index b2669ad..22c7625 100644 --- a/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml.cs +++ b/OpenSourceToolkit.NET/Controls/CopyableTextBox.axaml.cs @@ -1,6 +1,7 @@ -using Avalonia; +using Avalonia; using Avalonia.Controls; using Avalonia.Data; +using Avalonia.Input.Platform; using Avalonia.Media; using System.Windows.Input; diff --git a/OpenSourceToolkit.NET/Controls/DragDropTextBox.axaml b/OpenSourceToolkit.NET/Controls/DragDropTextBox.axaml index 78073f0..8643d49 100644 --- a/OpenSourceToolkit.NET/Controls/DragDropTextBox.axaml +++ b/OpenSourceToolkit.NET/Controls/DragDropTextBox.axaml @@ -1,4 +1,4 @@ - diff --git a/OpenSourceToolkit.NET/OpenSourceToolkit.NET.csproj b/OpenSourceToolkit.NET/OpenSourceToolkit.NET.csproj index 50b9621..e3dcdf2 100644 --- a/OpenSourceToolkit.NET/OpenSourceToolkit.NET.csproj +++ b/OpenSourceToolkit.NET/OpenSourceToolkit.NET.csproj @@ -1,10 +1,10 @@ - + WinExe net8.0-windows - 0.2.3 - 0.2.3.0 - 0.2.3.0 + 0.3.0 + 0.3.0.0 + 0.3.0.0 latest disable ..\bin\debug\ @@ -50,10 +50,10 @@ - - - - + + + + @@ -65,27 +65,27 @@ - + - - - + + + None All - - - + + + - - + + diff --git a/OpenSourceToolkit.NET/Views/SettingsWindow.axaml b/OpenSourceToolkit.NET/Views/SettingsWindow.axaml index c06f68d..7637ede 100644 --- a/OpenSourceToolkit.NET/Views/SettingsWindow.axaml +++ b/OpenSourceToolkit.NET/Views/SettingsWindow.axaml @@ -1,4 +1,4 @@ - @@ -266,7 +266,7 @@ + PlaceholderText="{loc:Localize Settings_Connections_NameWatermark}" HorizontalAlignment="Stretch"/> @@ -421,13 +421,13 @@ @@ -466,7 +466,7 @@ + PlaceholderText="{loc:Localize Settings_Providers_NewModelWatermark}" Margin="0,0,8,0"/> diff --git a/OpenSourceToolkit.NET/Views/Tools/ApiTesterToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/ApiTesterToolView.axaml index bb9dbb2..f6ada34 100644 --- a/OpenSourceToolkit.NET/Views/Tools/ApiTesterToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/ApiTesterToolView.axaml @@ -1,4 +1,4 @@ - - + @@ -24,10 +24,10 @@ - + - + @@ -38,7 +38,7 @@ - + diff --git a/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml index ace128b..3ce1bc2 100644 --- a/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml @@ -1,4 +1,4 @@ - - diff --git a/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml.cs b/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml.cs index 6fbdbf4..c1ccdf7 100644 --- a/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml.cs +++ b/OpenSourceToolkit.NET/Views/Tools/AsciiArtToolView.axaml.cs @@ -1,4 +1,5 @@ -using Avalonia.Controls; +using Avalonia.Controls; +using Avalonia.Input.Platform; using Avalonia.Interactivity; using Avalonia.Markup.Xaml; using Avalonia.Platform.Storage; diff --git a/OpenSourceToolkit.NET/Views/Tools/Base64ToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/Base64ToolView.axaml index c937b88..823b886 100644 --- a/OpenSourceToolkit.NET/Views/Tools/Base64ToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/Base64ToolView.axaml @@ -1,4 +1,4 @@ - - + - + - + diff --git a/OpenSourceToolkit.NET/Views/Tools/ColorToolView.axaml.cs b/OpenSourceToolkit.NET/Views/Tools/ColorToolView.axaml.cs index 0109558..b47789e 100644 --- a/OpenSourceToolkit.NET/Views/Tools/ColorToolView.axaml.cs +++ b/OpenSourceToolkit.NET/Views/Tools/ColorToolView.axaml.cs @@ -1,4 +1,5 @@ -using Avalonia.Controls; +using Avalonia.Controls; +using Avalonia.Input.Platform; using Avalonia.Markup.Xaml; using OpenSourceToolkit.NET.ViewModels.Tools; diff --git a/OpenSourceToolkit.NET/Views/Tools/CronToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/CronToolView.axaml index 1e62526..42cfe09 100644 --- a/OpenSourceToolkit.NET/Views/Tools/CronToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/CronToolView.axaml @@ -1,4 +1,4 @@ - - + diff --git a/OpenSourceToolkit.NET/Views/Tools/DiffCheckerToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/DiffCheckerToolView.axaml index ed5ac57..33a82a6 100644 --- a/OpenSourceToolkit.NET/Views/Tools/DiffCheckerToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/DiffCheckerToolView.axaml @@ -1,4 +1,4 @@ - - - + + diff --git a/OpenSourceToolkit.NET/Views/Tools/DnsToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/DnsToolView.axaml index 8371bfc..2697c7a 100644 --- a/OpenSourceToolkit.NET/Views/Tools/DnsToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/DnsToolView.axaml @@ -1,4 +1,4 @@ - - + diff --git a/OpenSourceToolkit.NET/Views/Tools/FinancialCalculatorToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/FinancialCalculatorToolView.axaml index 904c800..d70fead 100644 --- a/OpenSourceToolkit.NET/Views/Tools/FinancialCalculatorToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/FinancialCalculatorToolView.axaml @@ -1,4 +1,4 @@ - - + - + - + @@ -47,15 +47,15 @@ - + - + - + @@ -71,19 +71,19 @@ - + - + - + - + @@ -218,11 +218,11 @@ - + - + @@ -239,15 +239,15 @@ - + - + - + @@ -259,11 +259,11 @@ - + - + @@ -382,22 +382,22 @@ - + - + - + - + @@ -493,17 +493,17 @@ - + - + - + diff --git a/OpenSourceToolkit.NET/Views/Tools/FolderAnalyzerToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/FolderAnalyzerToolView.axaml index d7c80c3..7697fd5 100644 --- a/OpenSourceToolkit.NET/Views/Tools/FolderAnalyzerToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/FolderAnalyzerToolView.axaml @@ -1,4 +1,4 @@ - - + diff --git a/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml index a11074b..4343bb5 100644 --- a/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml @@ -1,4 +1,4 @@ - + PlaceholderText="{loc:Localize Fonts_Search_Watermark}"/> diff --git a/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml.cs b/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml.cs index 8a53a2b..fb5b9b6 100644 --- a/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml.cs +++ b/OpenSourceToolkit.NET/Views/Tools/FontsViewerToolView.axaml.cs @@ -1,4 +1,5 @@ -using Avalonia.Controls; +using Avalonia.Controls; +using Avalonia.Input.Platform; using Avalonia.Markup.Xaml; using Avalonia.Platform.Storage; using OpenSourceToolkit.NET.ViewModels.Tools; diff --git a/OpenSourceToolkit.NET/Views/Tools/HashToolView.axaml b/OpenSourceToolkit.NET/Views/Tools/HashToolView.axaml index bb36268..00eb7e6 100644 --- a/OpenSourceToolkit.NET/Views/Tools/HashToolView.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/HashToolView.axaml @@ -1,4 +1,4 @@ - - + - + diff --git a/OpenSourceToolkit.NET/Views/Tools/ImageConverter/AiAssistantPanel.axaml b/OpenSourceToolkit.NET/Views/Tools/ImageConverter/AiAssistantPanel.axaml index 3ad827c..8e472de 100644 --- a/OpenSourceToolkit.NET/Views/Tools/ImageConverter/AiAssistantPanel.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/ImageConverter/AiAssistantPanel.axaml @@ -1,4 +1,4 @@ - - + - + @@ -140,7 +140,7 @@ - + @@ -184,7 +184,7 @@ + FormatString="0" PlaceholderText="DPI" Margin="5,0,0,0"/> diff --git a/OpenSourceToolkit.NET/Views/Tools/ImageConverter/HorizontalToolOptionsBar.axaml b/OpenSourceToolkit.NET/Views/Tools/ImageConverter/HorizontalToolOptionsBar.axaml index f1e02f8..f2e096d 100644 --- a/OpenSourceToolkit.NET/Views/Tools/ImageConverter/HorizontalToolOptionsBar.axaml +++ b/OpenSourceToolkit.NET/Views/Tools/ImageConverter/HorizontalToolOptionsBar.axaml @@ -1,4 +1,4 @@ - + FormatString="0" PlaceholderText="Auto" Width="75"/> + FormatString="0" PlaceholderText="Auto" Width="75"/> @@ -319,7 +319,7 @@ - +