Skip to content

Upgrade to .NET 10, adds support for WinUI3, restores support for UWP.#77

Merged
aksoftware98 merged 13 commits into
aksoftware98:masterfrom
gerfen:upgrade/net10-multitarget-non-uwp
May 10, 2026
Merged

Upgrade to .NET 10, adds support for WinUI3, restores support for UWP.#77
aksoftware98 merged 13 commits into
aksoftware98:masterfrom
gerfen:upgrade/net10-multitarget-non-uwp

Conversation

@gerfen
Copy link
Copy Markdown
Contributor

@gerfen gerfen commented May 7, 2026

This PR upgrades the non-UWP solution projects for .NET 10 and aligns project/package references for local development.
What changed
• Added/updated .NET 10 targeting per project strategy:
• Apps (Blazor/WinUI/Console/Benchmarks): single-targeted to net10.0 (or net10.0-windows10.0.19041.0 for WinUI app)
• Libraries: kept multi-targeting and included .NET 10
• Updated package references to appropriate versions for .NET 10 (with conditional references where required for multi-targeted libraries).
• Removed duplicate/inconsistent local dependency references:
• Replaced in-solution NuGet package usage with ProjectReference where appropriate.
• Fixed SourceGenerator packaging configuration to avoid missing-file pack failures in multi-target builds.
Scope
• Included: non-UWP projects
• Restores support for UWP projects but only for .NET 6
Validation
• In-scope projects were rebuilt and test suite was run successfully (AKSoftware.Localization.MultiLanguages.Tests.csproj: all tests passed on .NET 10).

gerfen added 12 commits May 6, 2026 11:11
• migrate ExternalFileKeysProvider to BaseKeysProvider and implement required members (GetKeys(CultureInfo), RegisteredLanguages)
• replace missing ResourceFolderName dependency with local _resourceFolderName usage
• add provider namespace imports where needed so EmbeddedResourceKeysProvider resolves
• avoid ambiguous ServiceCollection type in UwpAkLocalization by using a compatible IServiceCollection implementation
… multi-language support

Optional body:
• add MultiBindingBehavior.cs project with MultiBinding behaviors, converters, and extensions
• add WinUIAkLocalization sample app and wire it into solution
• include language resources and flag assets for all sample cultures (en-US, de-DE, ca-ES, fr-FR, it-IT, ja-JP, ml-IN, ar-SA, fi-FI, bg-BG)
• update sample UI to use flag-based language picker and WinUI-compatible binding refresh flow
- Removed duplicate PackageReference from Benchmarks project
- Replaced PackageReferences with ProjectReferences in BlazorWebApp.Sample
- Verified .NET 10.0.201 SDK installation
- Confirmed no global.json compatibility issues

Note: BlazorWebApp.Sample has pre-existing compilation issue (IKeysAccessor) unrelated to these changes
- Updated packages with conditional references for multi-targeted libraries
- Core library: 8.0.0 -> 10.0.7 for .NET 10, kept 8.0.0 for net8.0/net9.0/netstandard2.0
- Blazor library: Same conditional approach
- SourceGenerator: Conditional DI abstractions by target framework
- Changed app projects to single-target .NET 10
- Removed System.ComponentModel.Annotations (included in framework)
- Disabled GeneratePackageOnBuild for SourceGenerator (pre-existing packaging issue)
- Fixed BlazorWebApp.Sample SourceGenerator reference attributes

Build Status: 10/11 in-scope projects succeed
- BlazorWebApp.Sample fails (pre-existing: missing YAML resources for source generator)

Note: UWP projects intentionally excluded per migration scope
- Ran full test suite on .NET 10 target
- Results: 50/50 tests passed (100% success rate)
- No test failures or behavioral issues detected
- Confirmed backward compatibility (net8.0 also 50/50)

Migration validation complete successfully.
…setup

• add ExternalFolder to LocalizationFolderType
• update WinUI ExternalFileKeysProvider to support local, installation, and fully-qualified external paths
• make UWP provider reject ExternalFolder in sandboxed apps
• update WinUI sample to exercise packaged/local and external localization scenarios
• add single-project MSIX assets and manifest files for the WinUI sample
…enarios

• add ExternalFolder to LocalizationFolderType
• add named WinUI factory methods for local, installation, and external folder scenarios
• keep packaged WinUI local-folder behavior aligned with UWP-style LocalState\Localization
• reject ExternalFolder in UWP because of sandbox restrictions
• refactor the WinUI sample registration flow to make supported localization sources easier to discover
• add comments and sample packaging assets to clarify packaged WinUI localization setup
@aksoftware98
Copy link
Copy Markdown
Owner

Hi @gerfen
Thanks for the PR.

Getting it merged this Saturday and publishing the package.

My current app on Microsoft Store is using it, I'm thinking of wrapping what I have in the app alongisde the source generator this package too for WinUI 3. It has a UILocalizationService and view model so developers can quickly inject.

@aksoftware98
Copy link
Copy Markdown
Owner

Ah you are following a different approach I liked it!
Have you got the chance to play with the source generator?

@gerfen
Copy link
Copy Markdown
Contributor Author

gerfen commented May 8, 2026

Hi @aksoftware98y,

My use case requires loading the localization resource files from an external location.

I like the source generation technique but do not have a direct use for it at the moment.

@aksoftware98
Copy link
Copy Markdown
Owner

LGTM

…0 + WinUI 3 release

• bump AKSoftware.Localization.MultiLanguages.Blazor and SourceGenerator versions to 6.1.0
• update copyright to AK Software 2026 and refresh PackageReleaseNotes across packages
• fix typo in core library release notes (supprot -> support)
• add full NuGet metadata to the WinUI 3 package (authors, description, license, icon, repo, version 6.1.0)
• update UWP nuspec to 6.1.0 and bump its dependency on the core library to 6.1.0

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aksoftware98 aksoftware98 merged commit e52e4ae into aksoftware98:master May 10, 2026
1 of 2 checks passed
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