visual studio - Accessing a resource file from a different project with ResourceManager C# -
i have visual studio solution consisting of multiple projects. in 1 of projects, have languagelocalization resource file. access file in code in different project using resourcemanager. when accessing resource file in same project use:
resourcemanager rm = new resourcemanager("namespace.languagelocalization", assembly.getexecutingassembly());
however when use same code in different project, can't find resource file. double checked make sure project referenced project resource file , declared in using statement @ top of class.
any suggestions?
the second argument resourcemanager
constructor specifies assembly contains resources. assembly.getexecutingassembly()
won't work because returns assembly other project. instead, pass typeof(apublicclassintheresourceassembly).assembly
; class in resource assembly do.
Comments
Post a Comment