Reources
-
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: -
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: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)
-
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)
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:
-
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:
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[^]
-
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[^]
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: