You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[native/monodroid] Fix unmangling of satellite assembly names (#9533)
Fixes: #9532
Context: #9410
Context: 86260ed
Context: c927026
In Debug configuration builds, `$(EmbedAssembliesIntoApk)`=false by
default. This enables Fast Deployment in commercial/non-OSS builds.
When `$(EmbedAssembliesIntoApk)`=true, there are two separate ways to
embed assemblies into the `.apk`:
* Assembly Stores (c927026), which is a "single" (-ish) file that
contains multiple assemblies, enabled by setting
`$(AndroidUseAssemblyStore)`=true.
This is the default behavior for Release configuration builds.
* One file per assembly (86260ed).
This is the default behavior for Debug configuration builds when
`$(EmbedAssembliesIntoApk)`=true.
Aside: #9410 is an attempt to *remove* support for the
"one file per assembly" packaging strategy, which will *not* be
applied to release/9.0.1xx.
When using the "one file per assembly" strategy, all the assemblies
are wrapped in a valid ELF shared library image and placed in the
`lib/{ABI}` directories inside the APK/AAB archive. Since those
directories don't support subdirectories, we need to encode satellite
assembly culture in a way that doesn't use the `/` directory
separator char.
This encoding, as originally implemented, unfortunately used the `-`
character which made it ambiguous with culture names that consist of
two parts, e.g. `de-DE`, since the unmangling process would look for
the first occurrence of `-` to replace it with `/`, which would form
invalid assembly names such as `de/DE-MyAssembly.resources.dll`
instead of the correct `de-DE/MyAssembly.resources.dll`. This would,
eventually, lead to a mismatch when looking for satellite assembly for
that specific culture.
Fix it by changing the encoding for `/` from `-` to `_`, so that the
mangled assembly name looks like
`lib_de-DE_MyAssembly.resources.dll.so` and we can unambiguously
decode it to the correct `de-DE/MyAssembly.resources.dll` name.
// Com.Balysv.Material.Drawable.Menu.MaterialMenuView.cs(214,30): warning CS0114: 'MaterialMenuView.OnRestoreInstanceState(IParcelable)' hides inherited member 'View.OnRestoreInstanceState(IParcelable?)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
@@ -114,6 +117,7 @@ public void DotNetBuild (string runtimeIdentifiers, bool isRelease, bool aot, bo
114
117
.ToArray();
115
118
varexpectedFiles=newList<string>{
116
119
$"{proj.PackageName}-Signed.apk",
120
+
"de-DE",
117
121
"es",
118
122
$"{proj.ProjectName}.dll",
119
123
$"{proj.ProjectName}.pdb",
@@ -163,6 +167,7 @@ public void DotNetBuild (string runtimeIdentifiers, bool isRelease, bool aot, bo
0 commit comments