Skip to content

Localization via satellite assemblies doesn't work for android when the app built in debug mode. #7622

@mattleibow

Description

@mattleibow

Issue moved from dotnet/maui#4470


From @nevse on Wednesday, February 2, 2022 12:39:22 PM

Description

If I run app in debug mode dotnet build -t:Run -f:net6.0-android it doesn't show translated message. For dotnet build -t:Run -f:net6.0-android -c:Release it does.
Project to reproduce - https://github.com/nevse/Maui-Tests-Localization1
debugVsRelease

Steps to Reproduce

  1. create app dotnet new maui -n HumanaizerTests
  2. add references
<ItemGroup>
        <PackageReference Include="Humanizer.Core" Version="2.14.1" />
        <PackageReference Include="Humanizer.Core.de" Version="2.14.1" /> 
</ItemGroup>
  1. change culture to de and use Humanizer to read data localization resources
CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = new CultureInfo("de");

CounterLabel.Text = DateTime.UtcNow.AddHours(-2).Humanize();
  1. run the app in debug dotnet build -t:Run -f net6.0-android and release mode dotnet build -t:Run -f:net6.0-android -c:Release

Version with bug

Preview 12 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

Area: App+Library BuildIssues when building Library projects or Application projects.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions