Resources

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kimmo Laine

    #1

    Resources

    Hi!

    How can i add existing resource file to a C# project in VS2005 without
    breaking the connection?

    Lets say that i have a resource file, "MyStrings.resx ", with one single
    string resource MY_STRING = "Hello!". When i create this file, VS will
    automatically add another file to my project - "MyStrings.Desi gner.cs".
    Because of this extra file, i can write code like this:

    MessageBox.Show (MyStrings.MY_S TRING);

    But when i import (Add existing item) these two files to another project,
    somethig goes wrong: i can add new string but the class file don´t update
    automatically.

    What is the correct way to import resources?


    thx

    Kimmo Laine



  • Dave Sexton

    #2
    Re: Resources

    Hi Kimmo,

    Did you try only importing the .resx file without the .cs file?

    I assume VS 2005 will have no problem regenerating the code file for you.

    --
    Dave Sexton

    "Kimmo Laine" <reply.to@newsg roup.onlywrote in message
    news:e8v51Sm$GH A.144@TK2MSFTNG P02.phx.gbl...
    Hi!
    >
    How can i add existing resource file to a C# project in VS2005 without
    breaking the connection?
    >
    Lets say that i have a resource file, "MyStrings.resx ", with one single
    string resource MY_STRING = "Hello!". When i create this file, VS will
    automatically add another file to my project - "MyStrings.Desi gner.cs".
    Because of this extra file, i can write code like this:
    >
    MessageBox.Show (MyStrings.MY_S TRING);
    >
    But when i import (Add existing item) these two files to another project,
    somethig goes wrong: i can add new string but the class file don´t update
    automatically.
    >
    What is the correct way to import resources?
    >
    >
    thx
    >
    Kimmo Laine
    >
    >
    >

    Comment

    Working...