Skip to content

ThisAssembly.Strings doesn't cope well with localized resx #173

@kzu

Description

@kzu

Add one .resx (culture neutral). Then add a localized version of it.

Result: compilation errors from duplicate Strings members
Expected: only the culture neutral resource should be considered for codegen. WithCulture on the items can be used to filter, such as:

  <Target Name="_RemoveCulturedResxFromStrings" AfterTargets="_InjectRexAdditionalFiles;_InjectResxAdditionalFiles" BeforeTargets="GenerateMSBuildEditorConfigFileShouldRun">
    <ItemGroup>
      <ResxCode Remove="@(ResxCode -&gt; WithMetadataValue('WithCulture', 'true'))" />
      <AdditionalFiles Remove="@(AdditionalFiles -&gt; WithMetadataValue('WithCulture', 'true'))" />
    </ItemGroup>
  </Target>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions