Resxis 0.1.0
dotnet add package Resxis --version 0.1.0
NuGet\Install-Package Resxis -Version 0.1.0
<PackageReference Include="Resxis" Version="0.1.0" />
<PackageVersion Include="Resxis" Version="0.1.0" />
<PackageReference Include="Resxis" />
paket add Resxis --version 0.1.0
#r "nuget: Resxis, 0.1.0"
#:package Resxis@0.1.0
#addin nuget:?package=Resxis&version=0.1.0
#tool nuget:?package=Resxis&version=0.1.0
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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Localization.Abstractions (>= 10.0.0)
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 |