Repository navigation
Localized satellite packages are not included in build output when using PackageReference #2012
Description
Activity
Any workarounds on this?
Hi Guys any progress on this?
This is still an issue! Any progress? Any workarounds?
Reacted by Michał Sznajder, Athanasios Mitrentsis, Cássio Nandi Citadin and Dan BalasescuAny updates or workarounds for this issue?
Ping? We're still getting reports of this:
Reacted by Dean Herbert and Cássio Nandi Citadinmoved to flutter
Can we open a sister issue on the iOS side of things? Where would it go?
No idea for a solution ? That's really problematic
This issue prevents Humanizer from being used in localized Xamarin projects (see Humanizr/Humanizer#799). This is especially problematic, as Humanizer is described as compatible to Xamarin and this issue does only starts to appear when non english translation are added later on in the development process.
It seems the iOS counterpart of this issue has been fixed in dotnet/macios#7113.
- addedArea: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.
on Jun 10, 2020 Sorry, I know this is an old ticket....
I don't see NuGet's
<ResolveNuGetPackageAssets/>MSBuild task returning the satellite assembly, and so the remainder of the build doesn't even know about this file.The cause of this behavior seems to be:
But if I set
$(NuGetRuntimeIdentifier)and$(RuntimeIdentifiers):msbuild .\SatelliteAssemblyApp\SatelliteAssemblyApp.Android\SatelliteAssemblyApp.Android.csproj /p:Configuration=Release /t:SignAndroidPackage /bl /r /p:NuGetRuntimeIdentifier=MonoAndroid8.1 /p:RuntimeIdentifiers=MonoAndroid8.1This makes
<ResolveNuGetPackageAssets/>returns the satellite assembly. But it still doesn't make it to the.apkfile 😞 .Let me review this behavior in .NET 5/6 and see what happens there: https://github.com/xamarin/net6-samples
Reacted by Chase Florell and Claire Novotny- added a commit that references this issue
on Jun 10, 2020 It appears that this is going to "just work" in .NET 6. But keep in mind, this is under active development:
https://github.com/xamarin/net6-samples/compare/satelliteassemblies
Reacted by Dean HerbertThank you very much for looking into this!
It appears that this is going to "just work" in .NET 6.
Does this mean this issue will not be resolved until .NET 6 is ready to use?
@cemrich I'm unsure about setting
$(NuGetRuntimeIdentifier)and$(RuntimeIdentifiers)in "legacy" MSBuild projects to workaround NuGet. It doesn't feel quite right...I will need to do more research.
Reacted by cemrich and Chase FlorellI worked around this issue by referencing the Humanizer dlls directly from my head projects and the shared project. I placed the dlls inside a separate project directory with following structure:
Humanizer.dll de/Humanizer.resources.dllI have not yet tested this solution for more than one localization package.
Reacted by Albie- addedpossibly-staleIssues that are potentially no longer relevant.Issues that are potentially no longer relevant.
on Nov 10, 2022 So, is it going to be fixed or not ?
- ghost removedpossibly-staleIssues that are potentially no longer relevant.Issues that are potentially no longer relevant.
on Nov 24, 2022 - ghost addedneed-attentionA xamarin-android contributor needs to reviewA xamarin-android contributor needs to review
on Nov 24, 2022 This issue is from 2018, I would follow the new one for updates on this: dotnet/maui#4470
- locked as resolved and limited conversation to collaborators
on Nov 28, 2022 - removedneed-attentionA xamarin-android contributor needs to reviewA xamarin-android contributor needs to review
on Nov 28, 2022
From @domyd on July 24, 2018 10:50
Description
Localized satellite packages do not seem to work in a Xamarin app when using the PackageReference restore method.
Likely related: Humanizr/Humanizer#380
Steps to Reproduce
Repro project: SatelliteAssemblyApp.zip. It's a git project with two additional branches: (Note: the referenced test nuget packages are included in
/localpackagesand restoring them should just work)works-single-packagereferences one single NuGet package (SatelliteAssemblyTest.1.0.0) that includes the main assembly and one localized resource DLL.doesnt-work-multiple-packagesreferences two NuGet packages:SatelliteAssemblyTest.1.0.1(which only has the main assembly) andSatelliteAssemblyTest.de.1.0.1(which only contains the localized resource DLL).Expected Behavior
The localized resource DLLs are included in the APK in both cases (
/assemblies/de/SatelliteAssemblyTest.resources.dllexists within the APK). On a device with German culture, the label on the main page should say "Deutsch" in both cases.Expected APK: works-single-package.zip
Actual Behavior
The localized resources are missing in the case of split nuget packages (
/assemblies/dedoesn't exist within the APK). On a device with German culture, the label on the main page says "English".Actual APK: doesnt-work-multiple-packages.zip
Basic Information
Copied from original issue: xamarin/Xamarin.Forms#3386