Problem restoring resx file values after updating Visual Studio to Version 17.11.1


After updating Visual Studio to Version 17.11.1 (and 17.11.0), resx files only return Neutral value and not other languages.

I have two different assemblies for resx files, one is general and the other is specific to a specific project (each of which has different resx files in Farsi and English languages)
vs2022

These codes were working properly before the update, but now they have a problem and only return English, which is the main language.

Program.cs:

builder. Services.AddLocalization(o => o.ResourcesPath = Path.Combine("Resources", "Common"));
builder. Services.AddLocalization(o => o.ResourcesPath = Path.Combine( "1.Core", "ContentService", "Resources"));

app. UseRequestLocalization(options =>
{
    var supportedCultures = new[] { "fa-IR", "en-US" };
    options. SetDefaultCulture(supportedCultures[0])
        . AddSupportedCultures(supportedCultures)
        . AddSupportedUICultures(supportedCultures)
        . ApplyCurrentCultureToResponseHeaders = true;
});

For testing, I also got help from the fluent validation library that I have used for errors in my project, but it only returns Persian language even when I set the Content-Language value to en-US to header request. This library was working properly before the update.

It was working properly before I updated but not now, does anyone know how to fix the problem or has anyone encountered this problem after the update?

Leave a Reply

Your email address will not be published. Required fields are marked *