Skip to content

DotNET version 8 #257

@sofiedotcafe

Description

@sofiedotcafe

NET 7 is officially deprecated, and Microsoft is no longer supporting it (see official notice) and for example, nixpkgs has deprecated it when used as tooling. To ensure we stay up-to-date, we should upgrade to .NET 8.

The biggest change is the bump from Avalonia 0.10.17 to 11.2.8, which introduces breaking changes. Specifically, the AvaloniaLocator has been removed, and various platform services have been moved or removed (e.g. with AppBuilder.WithIcons, it now needs to be used with Microsoft.Extensions.DependencyInjection). This requires refactoring, particularly around how we handle dependency injection and service locators. More changes listed here.

I have been packaging Stardrop for Nixpkgs (NixOS/nixpkgs#350713) and since nixpkgs had deprecated .NET 7 due to security issues, I had to patch Stardrop for .NET 8 to follow nixpkgs maintainers recommendations. Due to this, the majority of the work has been done to port Stardrop to .NET 8, and these patches are included in the PR for the package. This PR also involves upgrading from Avalonia 0.10.17 to 11.2.8, which requires a significant amount of refactoring.

Although the patch was initially done to address the deprecation of .NET 7 in nixpkgs, I think we should upstream the changes because it’s a major change, and it will ensure long-term compatibility with .NET 8 and help the upstream project too. This aligns with the official move to .NET 8 as the supported runtime, which is crucial for long-term stability, performance improvements, and security.

I’ve tested the changes for stability, but we would probably need to ensure everything is following best practices and that everything would be working smoothly due to it being currently just used for the nixpkgs package.

Let me know if you have any questions or concerns!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions