Skip to content

Update Avalonia to 12.1 - #23

Merged
ugai merged 1 commit into
mainfrom
chore/avalonia-12
Oct 16, 2026
Merged

ugai merged 1 commit into
mainfrom
chore/avalonia-12

Conversation

@ugai

@ugai ugai commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Supersedes #12 (Dependabot), whose CI fails because Avalonia 12 has breaking API changes.

Changes

  • Packages: Avalonia, Avalonia.Desktop, Avalonia.Themes.Fluent, Avalonia.Fonts.Inter 11.2.1 → 12.1.4; CommunityToolkit.Mvvm 8.2.1 → 8.4.2; Microsoft.Extensions.DependencyInjection 9.0.0 → 10.0.13 (same versions as Bump the avalonia group with 7 updates #12)
  • MainWindow.axaml.cs: e.Data.Contains(DataFormats.Files) → e.DataTransfer.Contains(DataFormat.File), e.Data.GetFiles() → e.DataTransfer.TryGetFiles()
  • App.axaml.cs: remove the template's DisableAvaloniaDataAnnotationValidation(). BindingPlugins is internal in 12, and DataAnnotations validation is now opt-in (AppBuilder.WithDataAnnotationsValidation()), so there is nothing to remove.
  • dnd.csproj: remove Avalonia.Diagnostics. Dependabot could only move it to 11.3.22 (no 12.x), and nothing called AttachDevTools().

Verified

  • dotnet build (0 warnings, 0 errors) with .NET SDK 10
  • dotnet run starts the app

Not verified

  • Dropping files by hand on Avalonia 12 (hover border, multiple files, non-file drags)

🤖 Generated with Claude Code

- Avalonia, Desktop, Themes.Fluent, Fonts.Inter 12.1.4;
  CommunityToolkit.Mvvm 8.4.2; Microsoft.Extensions.DependencyInjection 10.0.13
- Drag & drop: DragEventArgs.Data / DataFormats.Files ->
  DataTransfer / DataFormat.File, GetFiles() -> TryGetFiles()
- Drop the template code that removed the DataAnnotations validation
  plugin; BindingPlugins is internal in 12 and the validation is opt-in
- Remove the unused Avalonia.Diagnostics reference (it only goes up to
  11.3 and nothing called AttachDevTools)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 04:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Native drag-and-drop behavior remains unverified after the major framework upgrade and needs human validation.

0 open findings

What changed in this PR

Updates the Avalonia application to 12.1.4 and addresses the breaking APIs behind #12’s CI failure.

Changes:

  • Updates Avalonia and supporting dependencies; removes unused diagnostics.
  • Migrates drag-and-drop handlers to DataTransfer.
  • Removes obsolete DataAnnotations validation suppression.
File Description
dotnet-avalonia/​Views/​MainWindow.axaml.cs Uses Avalonia 12 file-drop APIs.
dotnet-avalonia/​dnd.csproj Updates dependencies and removes diagnostics.
dotnet-avalonia/​App.axaml.cs Removes obsolete validation-plugin access.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ugai
ugai merged commit e3561df into main Oct 16, 2026
4 checks passed
@ugai
ugai deleted the chore/avalonia-12 branch October 16, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants