1

I'm getting a warning "CA1824 Mark assemblies with NeutralResourcesLanguageAttribute" for my .NET6 assembly that has a resource file. From this question and its answers I have understood what that warning means, why it is there, and how you would usually resolve it.

But in my case the resource file contains only things like URLs with placeholders, which means the resources are equally valid for all languages/cultures.

I have not yet understood the implications of declaring a neutral language if the executing system later has a different culture (e.g. what happens if I declare the neutral language to be "en", but later on the system is de-DE). Does it harm the performance in such cases?

Is there a way to mark the resource as "language neutral", telling the resource manager it should always take these resources and not waste time searching for satellite assemblies, regardless of the system's current culture?

Or would I mark it as English and use a different attribute to redirect every request to this resource file, no questions asked?

Or is this one of those rare cases where you just suppress the warning?

LWChris
  • 3,320
  • 1
  • 22
  • 39

0 Answers0