wcfunit-testingapp-globalresources

Unit Test in VS2012


I have a WCF project and unit test project .The resource file is inside the WCF Service project inside App_GlobalResources folder, where the custom messages are stored. But I executed the unit test method, I got the below error System.IO.FileNotFoundException: Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file.


Solution

  • If you would like to create unit tests which rely on external resources, like your resource file, you will need to make sure that the unit test project also has that file.