Skip to content

Duplicated members on generated string resources class #493

@chrisbewz

Description

@chrisbewz

Describe the Bug

When declaring resources with same base name but different on suffix although the static string member generated, an extra partial class declaration is produced with same name, raising CS0102 error.

For example, the following declaration on resx file:

Image

Produces:

  • A static property accessible calling Strings.MSG.InstallationFailed (static property)
  • A nested partial class called InstallationFailed accessible calling Strings.MSG.InstallationFailed (static partial class)

This fires the CS012 compiler error since both declarations share the same base name.

Steps to Reproduce

  1. Create a Strings.resx file on project
  2. Create a resource with a common name SomeResource
  3. Create another resource with same base name and an extra suffix SomeResource_Alt

Back this issue
Back this issue

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