Skip to content

Localized assemblies are mistakenly flattened #1369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pharring opened this issue Jun 24, 2017 · 2 comments
Closed

Localized assemblies are mistakenly flattened #1369

pharring opened this issue Jun 24, 2017 · 2 comments

Comments

@pharring
Copy link

pharring commented Jun 24, 2017

Here's a repro. Note that System.Spatial includes localized resources for 9 languages.

  1. Create a new .csproj with the following contents:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net45</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="System.Spatial" Version="5.8.2" />
  </ItemGroup>
</Project>
  1. dotnet restore
  2. dotnet build
  3. Examine the bin\debug\net45

Result:
System.Spatial.resources.dll is alongside System.Spatial.dll
It's the zh-Hans version

Expect;
There should be 9 subfolders with the localized satellite DLLs.

Note: System.Spatial was chosen to demonstrate the issue. That nuget is commonly brought in via WindowsAzure.Storage

@pharring
Copy link
Author

While the _CopyFilesMarkedCopyLocal correctly uses %(DestinationSubDirectory)%, it appears that property is being lost somewhere along the way.

From the build log, the target _HandlePackageFileConflicts produces a bunch of messages like;

Encountered conflict between 'CopyLocal:C:\Users\pharring.nuget\packages\system.spatial\5.8.2\lib\net40\de\System.Spatial.resources.dll' and
'CopyLocal:C:\Users\pharring.nuget\packages\system.spatial\5.8.2\lib\net40\es\System.Spatial.resources.dll'. Could not determine winner due to equal file and assembly versions.
[Emphasis mine]

@pharring
Copy link
Author

Oh, seems to be a dupe of #1006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant