I'm having a hard time wrapping my mind around how the resources work in an ASP.NET project. In my solution I have 2 projects:
- A Website project that contains an App_GlobalResources folder where most of my resources reside (build action: "content").
- A utility project, compiled as class library (that the website references), where I need another set of resources (called "ExceptionMessages" hereafter).
Nota: each project uses its own resources, there is no cross linking involved here.
I added a new resource directly in my second project (both as "content" or "embeded resource") and tried to access it via ExceptionMessages.Tag
. Intellisense is happy about it and correctly suggests the Tag but I get the following error at runtime:
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resources.ExceptionMessages.resources" was correctly embedded or linked into assembly "App_GlobalResources.lqgd5zqy" at compile time, or that all the satellite assemblies required are loadable and fully signed."
Somehow, I don't understand why the webserver is looking for the resource in the App_GlobalResources instead of directly in the assembly where it is used... or how I could go around this in a clean way. Any hint or idea?
Thanks!