I tried to test the localization function for my console applcation by creating an satellite assembly to host the culture resources.
What i did is
1. Add a *.resx file into my project.
2. using resgen.exe to convert the resx to resources file
3. use al.exe to convert the resources file to the satellite assembly
4. Then modify the build option property of the resx file, change this from embedded resource to none. That's because i don't want it to be embedded and i would like it to use the satellite assembly
5. using code below to read the resource string from the satellite assembly
System.Resources.ResourceManager rm = new System.Resources.ResourceManager("MyApp.Resources", Assembly.GetExecutingAssembly());
console.WriteLine(rm.GetString("TestString"));
6. Once i build the project, in the release folder, i create a new folder called en-US which is the culture folder and put my satellite assembly into it.
7 But when i execute the exe. it report the exception MissingManifestResourceException.
"Could not find any resources appropriate for the specified culture or the neutral culture.
8. I guess i'm doing right according the MSDN article "Resources in Desktop Apps"
9 Is there something that i'm missing? Or anyone could provide a sample of this?
Thanks.