-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Satellite Assemblies not generated for some cultures (zh-CN) in .NET 6 #7331
Comments
In the meantime, is there any advice on what my approach should be using the current runtime/SDK? This is blocking my update of a very large repo to .NET 6 - lots of failing tests and localization is broken. Specifically, I'm looking for guidance whether using |
@nick-beer Using |
I know that this is related but I'm also seeing now that |
@nick-beer I'm not too sure about the specifics here, I'd file an issue in the runtime repo. |
This is intentional. the correct name of this culture is
|
Thanks for the information. As a summary:
These are both significant breakages for our code base - we use So, it sounds like I will need to update all of our localized Chinese assets to use |
@benvillalobos is it possible we consider adding a small hack in msbuild for .NET 6.0 to manually add zh cultures to the list it enumerates? like @nick-beer do you localize to other simplified Chinese languages? if not, I would recommend you to use |
I wouldn't be totally opposed to the hack, but I expect that we can get the aliasing work in MSBuild in for SDK 6.0.300, corresponding with VS 17.3. |
@tarekgh - thanks for the information. I'll keep my eye out for the aliasing changes in 6.0.300 (or later?), though I suspect we'll need to perform similar work in our runtime code that depends on |
Is there some known hack that could give me both the list of aliased cultures and non-aliased cultures? Using a union of these two lists might work to avoid this breaking change. |
I don't think there is a hack for that. I am wondering why you don't localize with language tags like |
@tarekgh - I just noticed |
|
The behavior of |
|
For everyone's convenience I'd like to spell out the issue and its fix since it took us a considerable amount of head scratching and reading to figure this one out.
This point especially created a lot of head scratching for us since we have CI pipelines on different versions of Windows, some of which produced valid Satellite Assemblies while others didn't.
Solution 1 (in the project file):
Solution 2 (runtimeconfig.json):
Solution 3(env variable, which I think is the only way to fix the issue at build time):
|
Hi, |
Issue Description
This appears to be a regression on Windows. Starting in .NET 6, a satellite assemblies are not generated for some cultures. For instance, a project with an embedded resource
resources.zh-CN.resx
will not generate a satellite assembly when using the .NET 6 SDK, but will when using the .NET 5 SDK. I'm not sure if this is limited tozh-CN
or not - though I suspect it's related to #3897.If I build from Visual Studio (2022 17.1.0 Preview 2), the satellite assembly will be generated. Building with the dotnet cli (SDK 6.0.101) will not generate the satellite assembly.
Steps to Reproduce
Build the attached project:
dotnet build LocalizationTest.csproj
LocalizationTest.zip
Expected Behavior
A satellite assembly will be generated into a
zh-CN
subfolder in the output folder.Actual Behavior
No satellite assembly is generated.
Versions & Configurations
Windows 11 (21H2 22000.132)
dotnet SDK 5.0.400 correctly generates the satellite assembly
dotnet SDK 6.0.101 does not
Visual Studio 2022 (17.1.0 Preview 2) does generate the satellite assembly
The text was updated successfully, but these errors were encountered: