Cannot access a Resource file from a Project with External Dependancies

0

I have 2 projects-A, B. In A, I have a resource file(FormTexts)that is linked to same resource file in B. In A I have a method that uses this resource file correctly. I can use:

ResourceManager rm = new 
ResourceMananger("MyProjects.A.Resources.FormTexts",Assembly.GetAssembly());
var str=rm.GetStrin("Title"). 

This works when I run the method()in the solution. Now, I have a created an Unit test which is calling the same function in Project A. When running the test, it crashes at the resource line --

var str=rm.GetStrin("Title").

Error:

System.Resources.MissingManifestResourceException HResult=0x80131532 Message=Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Library.FormViewerMain.resources" was correctly embedded or linked into assembly "Library" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Agin: No error when runs from the solution but fails when runs in the Unit test. Thanks.

c#
resources
asked on Stack Overflow Oct 9, 2019 by syedripon • edited Oct 9, 2019 by J. Murray

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0