How to Fix Missing Manifest Resource Exception in C#
I am currently developing an application that I know would be better if I support multi language. And while doing so encountered the above p...
https://www.czetsuyatech.com/2021/07/c-missing-manifest-resource-exception.html
I am currently developing an application that I know would be better if I support multi language. And while doing so encountered the above problem.
Solution:
In your application (whatever it is web, mobile, desktop) take note of where you are saving the .resx file.
By this I mean the namespace, example:
You have an application HelloWorld, and you save the .resx file in the root directory.
+HelloWorld
+yourresource.resx
So, when you access the resource you should call it by:
This is for the default language, you will just have to create subdirectory for your locale example en-us, etc.
Solution:
In your application (whatever it is web, mobile, desktop) take note of where you are saving the .resx file.
By this I mean the namespace, example:
You have an application HelloWorld, and you save the .resx file in the root directory.
+HelloWorld
+yourresource.resx
So, when you access the resource you should call it by:
ResourceManager rm = new ResourceManager("HelloWorld.yourresource", System.Reflection.Assembly.GetExecutingAssembly());
This is for the default language, you will just have to create subdirectory for your locale example en-us, etc.
Post a Comment