MissingManifestResourceException was unhandled C#
So I have a program that logs to a .resource file when things happen with
it. The problem is when it attempts to use the resource file I run into
this error:
MissingManifestResourceException was unhandled
Could not find any resources appropriate for the specified culture or the
neutral culture. Make sure "EventKernel.EventKernelMessages.resources" was
correctly embedded or linked into assembly "EventKernel" at compile time,
or that all the satellite assemblies required are loadable and fully
signed.
My code is as follows below:
public class KernelMessages {
private static ResourceManager rm = new
ResourceManager("EventKernel.EventKernelMessages",
Assembly.GetExecutingAssembly());
static KernelMessages() {
}
protected internal KernelMessages() {
}
public static string formatMessage(string key, object[] args) {
return string.Format(KernelMessages.rm.GetString(key), args);
}
public static string getString(string key) {
return KernelMessages.rm.GetString(key);
}
public static string getString(string key, string defaultValue) {
return KernelMessages.rm.GetString(key) ?? defaultValue;
}
}
Things I have attempted include checking the assembly namespace compared
with the project's Default Namespace, and that got me nowhere. I have
tried other mundane solutions such as changing the order of the
constructor and the formatMessage method(As suggested in another question
with the same issue.) and that yielded no results.
Any suggestions on how to tackle this issue or what could be wrong? Also
it is not the code. This is old code and is currently being used in a
released version of the software and it works properly, and as the
original DLL it functions just fine, but as it is de-compiled this is the
issue I get when I attempt to step through the code with breakpoints.
No comments:
Post a Comment