1
Vote

Bug in StringResources

description

Here is a sample resource file that generates the wrong output:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <data name="Root_Level1_Level2_Level3" xml:space="preserve">
    <value>Level3 message.</value>
  </data>
  <data name="Root_Level1" xml:space="preserve">
    <value>Level1 message.</value>
  </data>
</root>

The correct version should look like this:

public static partial class Root
{
    public static string Level1 { get { return Resources.Root_Level1; } }
}

But the template generates the following code:

public static partial class Root
{
    public static string Level1 { get { return Resources.Root_Level1_Level2_Level1; } }
}

comments