Skip to content

Localized satellite packages are not included in build output when using PackageReference #2012

Closed
@jassmith

Description

@jassmith

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 /localpackages and restoring them should just work)

  • Branch works-single-package references one single NuGet package (SatelliteAssemblyTest.1.0.0) that includes the main assembly and one localized resource DLL.
  • Branch doesnt-work-multiple-packages references two NuGet packages: SatelliteAssemblyTest.1.0.1 (which only has the main assembly) and SatelliteAssemblyTest.de.1.0.1 (which only contains the localized resource DLL).
  1. Build solution in Release mode
  2. Archive Android project to get an APK

Expected Behavior

The localized resource DLLs are included in the APK in both cases (/assemblies/de/SatelliteAssemblyTest.resources.dll exists 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/de doesn'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

  • Version with issue: 3.0.0.561731
  • Last known good version: not tested
  • IDE: VS 2017 (v15.7.5)
  • Platform Target Frameworks:
    • Android: 8.1
  • Android Support Library Version: 27.0.2
  • Nuget Packages: none, except the test package(s)

Copied from original issue: xamarin/Xamarin.Forms#3386

Metadata

Metadata

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