none
embedded resource names RRS feed

  • Question

  • If I have an embedded resource contained in a folder with a name like "0.0.0.1", then using GetManifestResourceNames I see the folder name gets underscores prepended, like "Namespace.Path.To.Folder._0._0._0.1.SomeResourceFile"

    Why is that?

    It seems to be that ".0" is the trigger.  ".1" doesn't get changed, nor does a 0 in any other location in the path.

    Thanks.
    roger reynolds
    Monday, June 29, 2009 4:56 PM

Answers

  • I'm an idiot, I think.
    The issue, I believe, is that the folder names need to end up looking like legal namespace names.
    So, the _ are prepended when necessary.

    I get it now.

    roger reynolds
    Monday, June 29, 2009 8:36 PM

All replies

  • I do not repro this, VS2008 puts an underscore ahead of any digit.  For example, I get

      .mresource public WindowsFormsApplication1._1._2._3._4.test.png

    That makes more sense, it appears to make sure that parts of the resource name are also proper identifier names.  Not sure why.  A workaround looks easy enough.

    Hans Passant.
    Monday, June 29, 2009 8:35 PM
    Moderator
  • I'm an idiot, I think.
    The issue, I believe, is that the folder names need to end up looking like legal namespace names.
    So, the _ are prepended when necessary.

    I get it now.

    roger reynolds
    Monday, June 29, 2009 8:36 PM