Since WCF services that support IIS tend to copy the DLL to a temporary folder rather than the contents of a project that is configured to copy for output, you must reference the actual dll code base.
var codeBase = System.Reflection.Assembly.GetCallingAssembly().CodeBase;
codeBase = codeBase.Substring(8);
var dir = codeBase.Substring(0, codeBase.LastIndexOf("/", System.StringComparison.Ordinal) + 1);
var file = @"ErrorMessages.xml";
var targetPath = dir + file;
source
share