dotnet / dotnet/sdk

Satellite assemblies not generated for valid neutral culture 'dv' (Divehi/Dhivehi)

Open
#54,835 3 comments 1 reaction 1 assignee Claimed by @baronfel View on GitHub
Area-NetSDK
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

## Description

The satellite assembly generation pipeline (MSBuild SDK, `al.exe`, `GenerateSatelliteAssembliesForCore`) rejects the `dv` (Divehi/Dhivehi) culture with `CultureNotFoundException`, even though it is a valid ISO 639-1 language code that works fine at runtime (`new CultureInfo("dv")` succeeds, `CultureInfo.CurrentUICulture` can be set to `dv`).

## Repro

1. Create a .resx file with `dv` culture suffix: `Resources\Strings.dv.resx`
2. Build the project
3. Observe: no `dv/` satellite assembly is generated (only `en/` if English `.resx` exists)
4. `al.exe -culture:dv` also throws `CultureNotFoundException`

## Expected

`dv` should be treated the same as other valid neutral cultures like `en`, `fr`, `es`, `ar`. Satellite assemblies should be generated, or at minimum, the build should not fail.

## Workaround

We had to write a custom `IStringLocalizer` that reads compiled `.resources` binaries directly from the main assembly using `Assembly.GetManifestResourceStream()` + `ResourceReader`, bypassing satellite assemblies entirely. This adds unnecessary complexity for something the framework should handle.

## Context

- .NET 10 SDK 10.0.108
- `dv` is ISO 639-1: https://en.wikipedia.org/wiki/Divehi_language
- Culture works fine at runtime: `new CultureInfo("dv")` returns valid CultureInfo with `Name = "dv"`, `TwoLetterISOLanguageName = "dv"`, `NativeName = "ދިވެހި"`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.