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. Reources

Reources

Scheduled Pinned Locked Moved C#
helphardwarequestion
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.
  • V Offline
    V Offline
    V 0
    wrote on last edited by
    #1

    Hi, I've managed to call the resources for my exe with no problem. This exe calls a dll with it's own resources and here I get the following error when I call the GetString("Resourcekey") method: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DivRrn.Resources.resources" was correctly embedded or linked into assembly "DivRrn" at compile time, or that all the satellite assemblies required are loadable and fully signed. I've checked and double checked, but I can't find my error: Here's the code: private void LoadLanguage(string language) {   string langcode = "en-US";   language = language.ToUpper();   switch(language) {      case "DUTCH":      case "NEDERLANDS":      case "NEERLANDAIS":      case "NE": langcode = "nl-BE";     break;      case "FRANS":      case "FRENCH":      case "FRANCAIS":      case "FR": langcode = "fr-FR";      break;     case "ENGLISH":      case "ENGELS":     case "ANGLAIS":      case "EN": langcode = "en-US";     break;      default: langcode = "en-US";      break;   } //end switch   resourcemanager = new ResourceManager("DivRrn.Resources", Assembly.GetExecutingAssembly());   Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(langcode); } //end method LoadLanguage and the error I get in this part: private void LoadLabels() {   gb_identity.Text = resourcemanager.GetString("gb_identity.Text"); //error here   lbl_regnrintl.Text = resourcemanager.GetString("lbl_regnrintl.Text");   lbl_idcardnr.Text = resourcemanager.GetString("lbl_idcardnr.Text");   //Snipped here   lbl_state.Text = resourcemanager.GetString("lbl_state.Text"); } Can anybody help me? tnx! Coulda, woulda, shoulda doesn't matter if you don't. :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig:

    T 1 Reply Last reply
    0
    • V V 0

      Hi, I've managed to call the resources for my exe with no problem. This exe calls a dll with it's own resources and here I get the following error when I call the GetString("Resourcekey") method: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DivRrn.Resources.resources" was correctly embedded or linked into assembly "DivRrn" at compile time, or that all the satellite assemblies required are loadable and fully signed. I've checked and double checked, but I can't find my error: Here's the code: private void LoadLanguage(string language) {   string langcode = "en-US";   language = language.ToUpper();   switch(language) {      case "DUTCH":      case "NEDERLANDS":      case "NEERLANDAIS":      case "NE": langcode = "nl-BE";     break;      case "FRANS":      case "FRENCH":      case "FRANCAIS":      case "FR": langcode = "fr-FR";      break;     case "ENGLISH":      case "ENGELS":     case "ANGLAIS":      case "EN": langcode = "en-US";     break;      default: langcode = "en-US";      break;   } //end switch   resourcemanager = new ResourceManager("DivRrn.Resources", Assembly.GetExecutingAssembly());   Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(langcode); } //end method LoadLanguage and the error I get in this part: private void LoadLabels() {   gb_identity.Text = resourcemanager.GetString("gb_identity.Text"); //error here   lbl_regnrintl.Text = resourcemanager.GetString("lbl_regnrintl.Text");   lbl_idcardnr.Text = resourcemanager.GetString("lbl_idcardnr.Text");   //Snipped here   lbl_state.Text = resourcemanager.GetString("lbl_state.Text"); } Can anybody help me? tnx! Coulda, woulda, shoulda doesn't matter if you don't. :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig:

      T Offline
      T Offline
      Travis D Mathison
      wrote on last edited by
      #2

      Place the code within a Try/Catch block and see what Exception is thrown. That should be the first thing you do to track down this error... The three exceptions you are looking for are: ArgumentNullException The name parameter is a null reference (Nothing in Visual Basic). InvalidOperationException The value of the specified resource is not a string. MissingManifestResourceException No usable set of resources has been found, and there are no neutral culture resources (this may be your problem)

      V 1 Reply Last reply
      0
      • T Travis D Mathison

        Place the code within a Try/Catch block and see what Exception is thrown. That should be the first thing you do to track down this error... The three exceptions you are looking for are: ArgumentNullException The name parameter is a null reference (Nothing in Visual Basic). InvalidOperationException The value of the specified resource is not a string. MissingManifestResourceException No usable set of resources has been found, and there are no neutral culture resources (this may be your problem)

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #3

        Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DivRrn.Resources.resources" was correctly embedded or linked into assembly "DivRrn" at compile time, or that all the satellite assemblies required are loadable and fully signed. this was the error I got from the try/catch block. Coulda, woulda, shoulda doesn't matter if you don't. :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig:

        T 1 Reply Last reply
        0
        • V V 0

          Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "DivRrn.Resources.resources" was correctly embedded or linked into assembly "DivRrn" at compile time, or that all the satellite assemblies required are loadable and fully signed. this was the error I got from the try/catch block. Coulda, woulda, shoulda doesn't matter if you don't. :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig:

          T Offline
          T Offline
          Travis D Mathison
          wrote on last edited by
          #4

          Reference the below links for potential resolutions to this issue: http://weblogs.asp.net/ngur/archive/2003/12/28/46219.aspx[^] http://www.avantbard.com/avantblog/?p=633[^]

          V 1 Reply Last reply
          0
          • T Travis D Mathison

            Reference the below links for potential resolutions to this issue: http://weblogs.asp.net/ngur/archive/2003/12/28/46219.aspx[^] http://www.avantbard.com/avantblog/?p=633[^]

            V Offline
            V Offline
            V 0
            wrote on last edited by
            #5

            tnx for the reply, but it didn't help. The first site spoke of the default namespace, which doens't count in my case, because I've already set it like they say. The second site I can't reach because my company blocks it. tnx for the effort. Coulda, woulda, shoulda doesn't matter if you don't. :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig: :jig:

            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