Resxis 0.1.0

dotnet add package Resxis --version 0.1.0
                    
NuGet\Install-Package Resxis -Version 0.1.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="Resxis" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Resxis" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Resxis" />
                    
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 Resxis --version 0.1.0
                    
#r "nuget: Resxis, 0.1.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 Resxis@0.1.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=Resxis&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Resxis&version=0.1.0
                    
Install as a Cake Tool

Resxis

A source-generated, satellite-assembly-free IStringLocalizer<T> that consolidates multiple .resx files into one strongly-typed class.

Install

<PackageReference Include="Resxis" Version="1.1.1" />

Setup

Declare the neutral .resx as AdditionalFiles with Namespace, ClassName, and Visibility metadata. Culture variants (e.g. Resources.de.resx) are listed as plain AdditionalFiles — they inherit from the neutral file.

<ItemGroup>
  <AdditionalFiles Include="Resources.resx"
    Namespace="My.App" ClassName="Resources" Visibility="public" />
  <AdditionalFiles Include="Resources.de.resx" />
</ItemGroup>

The package automatically removes those .resx files from the SDK's default EmbeddedResource glob — no satellite assemblies are produced and no manual Remove entries are needed.

Dependency Injection

Register Resxis in your service container, then inject IStringLocalizer<Resources> and look up keys:

// Program.cs / Startup.cs
services.AddResxisLocalization();

// Usage
public class MyService(IStringLocalizer<Resources> localizer)
{
    public string Greet() => localizer["WELCOME"].Value;
}

Opt-in: Value Properties

Set GenerateValueProperties="true" on the neutral file to generate a public static string {KEY} property per resource key:

<AdditionalFiles Include="Resources.resx"
  Namespace="My.App" ClassName="Resources" Visibility="public"
  GenerateValueProperties="true" />

Each property returns the culture-aware value for CultureInfo.CurrentUICulture, falling back to the key name if no translation is found. This enables data-annotation interop:

[Display(ResourceType = typeof(Resources), Name = nameof(Resources.MY_KEY))]
public string MyProperty { get; set; }

Diagnostics

ID Severity Description
RESXIS001 Error Duplicate key detected across files for the same class
RESXIS002 Warning Culture file has no neutral-file sibling — it will be ignored
RESXIS003 Info Non-string entry skipped (Resxis only handles string values)

Sample

See samples/Resxis.Sample for a runnable end-to-end example.

Product Compatible and additional computed target framework versions.
.NET 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 80 5/26/2026