Skip to content

String resources should allow .NET 2.0 string type #4636

Closed

Description

@rainersigwald

Splitting from #4634 (comment) on behalf of @filipnavara:

  <data name="icondef" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>icondef.xml;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1250</value>
  </data>

and this is how it is accessed from code:

ResourceManager resources = new ResourceManager(typeof(Resources.IM.Emoticons));
XmlTextReader xmlreader = new XmlTextReader(new StringReader(resources.GetString("icondef")));

or alternatively the pregenerated .Designer.cs code:

        internal static string icondef {
            get {
                return ResourceManager.GetString("icondef", resourceCulture);
            }
        }

...

Ha, surprisingly you came up with the same workaround as my colleague. Changing to Version=4.0.0.0 seemed to help.

Activity

  1. added
    Area: Task: GenerateResource
    on Aug 19, 2019
  2. added this to the MSBuild 16.3 milestone on Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: Task: GenerateResourcetriaged

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions