Skip to content

Conversation

@MrJul
Copy link
Member

@MrJul MrJul commented Oct 18, 2025

What does the pull request do?

This PR updates Avalonia to .NET 10.
The .NET 10 RC2 SDK or later is needed to build the solution.

Main changes

  • Projects target .NET 10 and .NET 8 (up from .NET 8 and .NET 6).
  • C# 14 is used.
    • Variables named field have been renamed.
    • Various LINQ Reverse() calls on arrays have been fixed due to the new implicit Span<T> conversion.
  • System.* and Microsoft.* packages have been updated.

Android changes

  • Some parameters newly marked as nullable have been handled accordingly.
  • Usages of reflection in AvaloniaAccessHelper have been replaced by standard casts.
  • AndroidScreens no longer use an experimental API that was removed from AndroidX.

Unchanged (yet)

  • .NET Standard 2.0 is still here and will be removed in a subsequent PR.
  • Conditional code targeting .NET 6.0 is still in place for now.

@DJGosnell
Copy link
Contributor

  • .NET Standard 2.0 is still here and will be removed in a subsequent PR.

Not that I use it, but does this mean dropping dotnet Framework support?

@maxkatz6
Copy link
Member

@DJGosnell yes. See our previous announcement #18606

@BobbyCannon
Copy link
Contributor

BobbyCannon commented Oct 23, 2025

@maxkatz6 How does dropping .net standard 2.0 affect visual studio extension? I know there is a new SDK for building out of process .NET 8 VS extensions but I think it's lacking a lot of features.

Is this going to be an issue?

I don't think so as long as Avalonia.Remote.Protocol supports .net standard 2.0?

@maxkatz6
Copy link
Member

@BobbyCannon our previewer is out-of-process already. But Avalonia.Remote.Protocol is expected to support netstandard, yes, as it provides protocol and dtos to connect to previewer process, and used from both VS and Rider extensions.

@BobbyCannon
Copy link
Contributor

@BobbyCannon our previewer is out-of-process already. But Avalonia.Remote.Protocol is expected to support netstandard, yes, as it provides protocol and dtos to connect to previewer process, and used from both VS and Rider extensions.

I was only concern with protocol. I know the previewer is out of process and I'm not concerned with it.

This is great news, thank you.

@MrJul MrJul force-pushed the feature/dotnet10 branch 2 times, most recently from d2e77ad to 4114031 Compare November 4, 2025 20:02
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0059792-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul marked this pull request as ready for review November 5, 2025 10:52
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0059798-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

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

We haven't decided on what to do with .NET 6 target yet, but other than that LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants