ResXLocalization.Core 1.0.0

dotnet add package ResXLocalization.Core --version 1.0.0
                    
NuGet\Install-Package ResXLocalization.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ResXLocalization.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ResXLocalization.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ResXLocalization.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ResXLocalization.Core --version 1.0.0
                    
#r "nuget: ResXLocalization.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ResXLocalization.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ResXLocalization.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ResXLocalization.Core&version=1.0.0
                    
Install as a Cake Tool

ResXLocalization

Type-safe .resx localization for Avalonia and WPF - switch language live, write zero csproj boilerplate.

ResXLocalization takes the .resx files you already know and adds:

  • Live, no-reload language switching - set one property and every bound string updates in place.
  • 🔒 Type-safe, compile-checked keys - a Roslyn source generator turns every .resx into strongly-typed keys, so a renamed or deleted resource becomes a compile error, not a runtime surprise.
  • 🗂️ First-class multiple .resx support - look up by typed key, scope to one file, or search across all registered files.
  • 🔤 Enum localization built in - localize enum members by convention.
  • 🧮 Format arguments - Get(key, args…) formats in the active culture.
  • 🩺 Missing-translation diagnostics - a visible, configurable !key! sentinel plus a TranslationNotFound event.
  • 🌐 Language-picker ready - GetAvailableCultures() discovers the cultures your app actually ships.
  • 🚀 Native AOT & trim clean (Avalonia package) - zero IL2026/IL3050, no reflection over your resources.
  • 📦 One package, zero csproj boilerplate - runtime engine, source generator, and MSBuild wiring ship together.

Normal .NET parent/neutral resource fallback applies. TranslationNotFound is raised only when a key is unresolved across the complete fallback chain, not when a satellite entry falls back successfully.

Typed keys are generated for string entries in dot-free neutral .resx files that have a same-folder classic .Designer.cs accessor. Satellite files, non-string entries, files without that designer, and SDK GenerateResxSource accessors are not eligible.

Malformed eligible files produce the RXLGEN001 build diagnostic. Accessor namespaces and types are read from C# syntax, including file-scoped/global namespaces and imported or aliased System.Resources.ResourceManager types.

Quick start


<TextBlock Text="{l:Localize {x:Static res:AppStringsKeys.Greeting}}" />
// Register your resources once at startup …
Localizer.Current.RegisterResourceManager(AppStrings.ResourceManager);

// … then switch the whole UI to German - every bound string re-resolves in place, no reload.
Localizer.Current.CurrentCulture = new CultureInfo("de");

The XAML namespace to map:

Avalonia:  xmlns:l="clr-namespace:RentADeveloper.ResXLocalization.Avalonia;assembly=ResXLocalization.Avalonia"
WPF:       xmlns:l="clr-namespace:RentADeveloper.ResXLocalization.WPF;assembly=ResXLocalization.WPF"

Two packages, one engine

Package UI framework Targets Native AOT
ResXLocalization.Avalonia Avalonia 12 net8.0 · net10.0
ResXLocalization.WPF WPF net8.0-windows · net10.0-windows ❌ (WPF limitation)

Both share the same UI-agnostic engine (ILocalizer / Localizer.Current, ResourceKey), the same source generator, and the same MSBuild wiring.

Documentation

The full documentation - quick start, lookup modes, enum localization, multiple .resx files, Native AOT publishing, troubleshooting, and complete runnable sample apps for both frameworks - lives in the project README; the API reference documents every type.

License

Released under the MIT License. © 2026 David Liebeherr.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 0 7/13/2026