Hi there,
I wanna work with resource file by this code in .net Core 5 MVC:
rm = new ResourceManager("Resources.Texts", System.Reflection.Assembly.Load("Resources"));
ci = Thread.CurrentThread.CurrentCulture;
rm.GetString(name, ci);
My resource name file is "Texts.fa.resx".
This is my config in Startup class:
services.AddLocalization(options => options.ResourcesPath = "ControlPanel/Resources");
services.AddMvc()
.AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix)
.AddDataAnnotationsLocalization();
But i got this error:
Could not load file or assembly 'Resources, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
My References folder Located here: "rootOfProject/ControlPanel/Resources"
Can everyone help me?
What I have tried:
Also i got this error:
Could not find the resource "Texts.en-US.resources" among the resources "" embedded in the assembly "NasimSys_V12", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.