dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.98k stars 4.66k forks source link

[Wasm] Satellite assemblies for localization are not used #107742

Open jeromelaban opened 1 week ago

jeromelaban commented 1 week ago

Description

When adding .withConfig({ loadAllSatelliteResources: true }), satellite assemblies are all downloaded and loaded by the runtime, but using resources from those satellites resources does not work properly.

Reproduction Steps

The following:

var r = new System.Resources.ResourceManager("FxResources.System.Web.Services.Description.SR", typeof(System.Web.Services.Description.Binding).Assembly);
Console.WriteLine($"Res(en): {r.GetString("WebDescriptionMissing", new CultureInfo("en-US"))}");
Console.WriteLine($"Res(fr): {r.GetString("WebDescriptionMissing", new CultureInfo("fr"))}");

Repro: 107742-testresources01.zip

Expected behavior

The second line should return french.

Actual behavior

Res(en): Cannot find definition for {0}.  Service Description with namespace {1} is missing.
Res(fr): Cannot find definition for {0}.  Service Description with namespace {1} is missing.

Regression?

Feels like it is, net8 got it available.

Known Workarounds

None.

Configuration

.NET 9 RC1

Other information

No response

lewing commented 1 week ago

should be fixed in https://github.com/dotnet/runtime/pull/107398

dotnet-policy-service[bot] commented 1 week ago

Tagging subscribers to this area: @dotnet/area-system-resources See info in area-owners.md if you want to be subscribed.

dotnet-policy-service[bot] commented 1 week ago

Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.

jeromelaban commented 1 week ago

The issue is still present with today's rc2:

Installed Workload Id      Manifest Version                      Installation Source
------------------------------------------------------------------------------------
wasm-experimental          9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2
wasm-tools                 9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2
lewing commented 1 week ago

The issue is still present with today's rc2:

Installed Workload Id      Manifest Version                      Installation Source
------------------------------------------------------------------------------------
wasm-experimental          9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2
wasm-tools                 9.0.0-rc.2.24461.16/9.0.100-rc.2      SDK 9.0.100-rc.2

fix just merged, tomorrow's sdk should have it

jeromelaban commented 12 hours ago

@lewing I've tried RC2 again (9.0.100-rc.2.24468.2-win-x64)

Installed Workload Id      Manifest Version                     Installation Source
-----------------------------------------------------------------------------------
wasm-experimental          9.0.0-rc.2.24468.6/9.0.100-rc.2      SDK 9.0.100-rc.2
wasm-tools                 9.0.0-rc.2.24468.6/9.0.100-rc.2      SDK 9.0.100-rc.2

And the issue is still present.

maraf commented 12 hours ago

I'll take a look