resx-lint is more than a localization checker β it is a complete .resx quality and productivity tool for .NET apps.
It validates your localization keys against both XAML and C#, catching missing, duplicate, orphaned, and untranslated entries before they reach production. That means fewer runtime surprises, cleaner resource files, and a much more reliable localization workflow.
What makes resx-lint stand out is its AI-powered translation workflow. When keys are missing or placeholders need to be filled, the built-in web UI can automatically translate them using AI providers (OpenAI, Anthropic, Azure, Google, DeepSeek, or custom endpoints), helping you localize entire resource sets in seconds instead of manually editing each string one by one.
- Validates
.resxfiles against real application usage in XAML and C# - Detects missing, duplicate, orphaned, and untranslated keys
- Suggests likely matches for typos and naming mistakes
- Offers automatic translation with AI for missing or incomplete entries
- Provides a fast, visual web UI editor for reviewing and applying changes
- Integrates cleanly with CLI, CI, and MSBuild
- Helps teams keep localization consistent across multiple languages and projects
- Built for speed and confidence
Whether you are maintaining a single app or a large multilingual product, resx-lint helps you keep translation files clean, accurate, and up to date. You can audit, fix, preview, and translate from one place β with AI doing the heavy lifting when you need to move fast.
- Static analysis β scans
{maui:Translate Key}in XAML andAppResources.Keyin C# - Auto-fixes β removes duplicate keys, adds missing
Designer.csproperties, backfills orphaned language entries - MSBuild-native errors β emits
file(line): error TRANS001: ...for inline squiggles in VS/Rider - Similar key suggestions β suggests closest matches for typos
--what-ifmode β preview every change without touching files- CI-friendly β
--fail-on-warningsescalates warnings to errors
- Translation Matrix Editor β edit all language cells side-by-side in a virtual-scrolled grid
- π§π· Language flags β locale-to-flag conversion (Regional Indicator Symbols)
- Configurable base language β pick your source language (e.g.
pt-BR) via searchable picker - Live missing count β header badges update in real time as you type
- AI batch translate β translate missing/placeholder keys via OpenAI, Anthropic, Azure, Google, DeepSeek, or custom endpoints
- Auto-fix preview & apply β see what changes before writing to disk
- Project manager β save multiple projects, scan for
.resxfiles, quick audit - Self-update β one-click
dotnet tool updateinside the UI - Sound effects β optional audio feedback on save, translate, and errors
- Dark/Light theme β persistent toggle
- π’ Keyboard shortcuts β
Ctrl+1/2/3views,Ctrl+Enteraudit,Ctrl+Ssave,Ctrl+Fsearch,Escclose modals - Export/Import Excel β spreadsheet round-trip for translation managers
- Virtual scrolling β handles 10,000+ keys without freezing
TODO: Replace these placeholders with actual screenshots.
| Projects Dashboard | Translation Matrix |
|---|---|
![]() |
![]() |
| Lint Results | AI Translation Config |
|---|---|
![]() |
dotnet tool install --global ResxLintdotnet new tool-manifest
dotnet tool install ResxLintNew devs and CI agents just run:
dotnet tool restoreresx-lintShows a 3-second prompt:
- Press W β opens the Web UI at
http://localhost:7950 - Wait 3s β auto-detects a
.resxin the current directory and runs the CLI lint
resx-lint --project-dir <dir> --resx-file <path> [options]| Option | Description |
|---|---|
--project-dir <dir> |
Root of the project (where .xaml and .cs files live) |
--resx-file <path> |
Path to the base .resx file |
--what-if |
Preview all changes without writing any files |
--fail-on-warnings |
Treat TRANS006 and TRANS007 as fatal errors |
--quiet |
Suppress β OK and βΉ INFO messages |
--help |
Show help and exit |
resx-lint --serveOr press W in interactive mode. Opens at http://localhost:7950.
| Option | Description |
|---|---|
--port <port> |
Custom port (default: 7950) |
--no-open |
Don't open browser automatically |
resx-lint --check-updateOr click the version badge in the Web UI header.
Add this target to your .csproj to run validation on every build:
<Target Name="ValidateTranslationKeys" BeforeTargets="BeforeBuild">
<!-- Friendly error if resx-lint is not installed -->
<Exec Command="resx-lint --help"
ConsoleToMSBuild="true"
IgnoreExitCode="true"
StandardOutputImportance="low"
StandardErrorImportance="low">
<Output TaskParameter="ExitCode" PropertyName="_ResxLintExitCode" />
</Exec>
<Error
Condition="'$(_ResxLintExitCode)' == '9009' OR '$(_ResxLintExitCode)' == '127'"
Text="resx-lint is not installed. Run: dotnet tool install --global ResxLint | Docs: https://github.com/CW-Software-Apps/resx-lint" />
<!-- Run validation -->
<Exec
Command="resx-lint --project-dir "$(MSBuildProjectDirectory)" --resx-file "$(MSBuildProjectDirectory)/Resources/AppResources.resx""
ConsoleToMSBuild="true"
IgnoreExitCode="false" />
</Target>Linux / CI / Docker: Always use forward slashes in the
--resx-filepath.$(MSBuildProjectDirectory)/Resources/AppResources.resxworks on both Windows and Linux.
If the tool is not installed, the build stops with a clear message instead of the cryptic exited with code 9009.
For strict mode, add --fail-on-warnings to the Exec command.
- name: Validate translations
run: resx-lint --project-dir . --resx-file Resources/AppResources.resx --fail-on-warningsRUN dotnet tool install --global ResxLint
ENV PATH="${PATH}:/root/.dotnet/tools"
COPY [".", "/src/app"]
RUN resx-lint --project-dir /src/app --resx-file /src/YourLibrary/Resources/AppResources.resx
RUN dotnet publish MyApp.csproj -f net10.0-android -c ReleaseExit code 3 on fatal errors stops the Docker build, preventing broken deployments.
| Code | Severity | Description | Action |
|---|---|---|---|
TRANS001 |
β Fatal | Key used in {maui:Translate Key} (XAML) not found in base .resx |
Fix manually |
TRANS002 |
π§ Auto-fix | Duplicate key found in a .resx file |
Extra occurrences removed |
TRANS003 |
π§ Auto-fix | Key in base .resx has no corresponding property in Designer.cs |
Property added automatically |
TRANS004 |
β Fatal | Key accessed as AppResources.Key (C#) not found in base .resx |
Fix manually |
TRANS005 |
π§ Auto-fix | Key exists in a language file but not in the base .resx |
Added to base with [TRANSLATE] placeholder |
TRANS006 |
Key in base .resx has no translation in one or more language files |
Add translation or escalate with --fail-on-warnings |
|
TRANS007 |
Base .resx value is empty or a placeholder like [TRANSLATE] |
Translation pending |
Fatal errors (TRANS001, TRANS004) stop the build immediately. Auto-fixes (TRANS002, TRANS003, TRANS005) modify files and return exit code 1 so MSBuild restarts the build to re-validate.
| Code | Meaning |
|---|---|
0 |
All OK β no issues found |
1 |
Auto-fixes were applied β restart the build to re-validate |
2 |
Invalid parameters |
3 |
Fatal errors found (TRANS001 or TRANS004) |
βββ 4/6 Validating XAML usage ({maui:Translate}) βββ
Views/HomePage.xaml(42) : error TRANS001 : Translation key 'WelcomeTitel' not found in AppResources.resx. Similar keys: 'WelcomeTitle'.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SUMMARY β resx-lint
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
.resx base : Resources\AppResources.resx
Keys in base : 312
Languages : 2 (AppResources.en-US.resx, AppResources.es-ES.resx)
Auto-fixes applied : 0
Warnings : 0
Fatal errors : 1
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Build cancelled: 1 fatal error(s). Fix the missing keys and rebuild.
- .NET 10 SDK or later
MIT Β© CW Software



