Issue Description
I was trying to add support of an uncommon language to my app with resource files, before I realized its language tag was not being recognized by MSBuild, and it was not generating the expected satellite assembly for that language.
Steps to Reproduce
- Create a project with three resource files:
Resources.resx, Resources.zh.resx, and Resources.yue.resx.
- Build the project.
Expected Behavior
The satellite assemblies for both zh and yue are generated.
Actual Behavior
The satellite assembly for zh is generated, but the one for yue is not.
Analysis
I suspect that the following code is causing this issue.
|
CultureInfo.GetCultureInfo(name, predefinedOnly: true); |
A valid language code is not necessarily predefined.
Versions & Configurations
No response
Issue Description
I was trying to add support of an uncommon language to my app with resource files, before I realized its language tag was not being recognized by MSBuild, and it was not generating the expected satellite assembly for that language.
Steps to Reproduce
Resources.resx,Resources.zh.resx, andResources.yue.resx.Expected Behavior
The satellite assemblies for both
zhandyueare generated.Actual Behavior
The satellite assembly for
zhis generated, but the one foryueis not.Analysis
I suspect that the following code is causing this issue.
msbuild/src/Tasks/CultureInfoCache.cs
Line 70 in 7ca3c98
A valid language code is not necessarily predefined.
Versions & Configurations
No response