Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. resX Files

resX Files

Scheduled Pinned Locked Moved C#
csharpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gordingin
    wrote on last edited by
    #1

    I am trying to add an existing resX file to my project and it won't take. Any reason? Are this added differently or create in some other way (new to this .NET stuff) thanks Ralph

    H 1 Reply Last reply
    0
    • G gordingin

      I am trying to add an existing resX file to my project and it won't take. Any reason? Are this added differently or create in some other way (new to this .NET stuff) thanks Ralph

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      What do you mean "it won't take". Please be more technical, as this is a technical forum. If you mean it won't compile to a .resources file and get embedded in your assembly, right-click on the file, select Properties, and change the Build Action to "Embedded Resource". If you're new to .NET, you should definitely read the .NET Framework SDK. It contains many topics - including localization with resx files - and the class library documentation for the .NET Framework itself. See http://msdn.microsoft.com/netframework/using/[^] for more information and links to the .NET Framework SDK on MSDN Library Online. Browsing the MANY articles here on .NET and C# on CodeProject can also be beneficial. There are many examples and code-snippets for all levels of programmers. Just browse the relevent categories.

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      G 1 Reply Last reply
      0
      • H Heath Stewart

        What do you mean "it won't take". Please be more technical, as this is a technical forum. If you mean it won't compile to a .resources file and get embedded in your assembly, right-click on the file, select Properties, and change the Build Action to "Embedded Resource". If you're new to .NET, you should definitely read the .NET Framework SDK. It contains many topics - including localization with resx files - and the class library documentation for the .NET Framework itself. See http://msdn.microsoft.com/netframework/using/[^] for more information and links to the .NET Framework SDK on MSDN Library Online. Browsing the MANY articles here on .NET and C# on CodeProject can also be beneficial. There are many examples and code-snippets for all levels of programmers. Just browse the relevent categories.

        -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

        G Offline
        G Offline
        gordingin
        wrote on last edited by
        #3

        Thanks I will take a peek but I will reiterate. I have 2 projects and am moving some controls from 1 to the other. In the first project, there are a bunch of .resX file in the project tree. I copy those files to my new project directory, try to add them like I would any other file (via context menu). Basically it doesn’t add it to the tree like on would expect. I can add cs files, etc, but not these .resX files. I hope that is a bit clearer.. sorry for the confusion…

        H 1 Reply Last reply
        0
        • G gordingin

          Thanks I will take a peek but I will reiterate. I have 2 projects and am moving some controls from 1 to the other. In the first project, there are a bunch of .resX file in the project tree. I copy those files to my new project directory, try to add them like I would any other file (via context menu). Basically it doesn’t add it to the tree like on would expect. I can add cs files, etc, but not these .resX files. I hope that is a bit clearer.. sorry for the confusion…

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          Again, what is the exact error? What exactly won't work? Please be specific. If you're copying those to your new project directory and trying to add them into that project, you should expect a "file exists" error. Instead, show the hidden files for that project by selecting an item in that project and click the Project menu, then Show All Files. Find the resx file in that directory, right-click, and select Include in Project. Make sure you take the namespaces changes into account if you didn't override the default namespace for your project (if necessary) in the project configuration settings (right-click on the project and select Properties). In VS.NET, resx files are created using the root namespace of the project, followed by any directories in which the resx files are located, and are finally compiled to .resources file with the namespace and filename prepended.

          -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

          G 1 Reply Last reply
          0
          • H Heath Stewart

            Again, what is the exact error? What exactly won't work? Please be specific. If you're copying those to your new project directory and trying to add them into that project, you should expect a "file exists" error. Instead, show the hidden files for that project by selecting an item in that project and click the Project menu, then Show All Files. Find the resx file in that directory, right-click, and select Include in Project. Make sure you take the namespaces changes into account if you didn't override the default namespace for your project (if necessary) in the project configuration settings (right-click on the project and select Properties). In VS.NET, resx files are created using the root namespace of the project, followed by any directories in which the resx files are located, and are finally compiled to .resources file with the namespace and filename prepended.

            -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

            G Offline
            G Offline
            gordingin
            wrote on last edited by
            #5

            I clicked show all files and I do see although it looks like it is a link of some sort. I will take a look at the link you sent me.... thanks Ralph

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups