Changing Resource files (resx) namespace and access modifier

Michael Pereira picture Michael Pereira · Aug 26, 2009 · Viewed 56k times · Source

In my webproject I'm using 4 resources files in my App_GlobalResources folder. One of them (lang.resx) has been created before my arrival on the project. It has the correct namespace (WebApplication.App_GlobalResources) and access modifier : public.

On the other hand, the three others Resource files that I just created have a different namespace (Resources) and internal access modifier, and I can't change it on the Resource File Form from Visual Studio because it's disabled. If I try to change it directly in the designer.cs file, the modifications are cancelled on the next save of the file.

It's not a critical bug but it can be misleading for the others developers on the project to find different namespaces and access modifiers for the resources files they will use.

Answer

Mark Bonafe picture Mark Bonafe · Sep 14, 2012

The quick answer is: Just open the Properties of the resource file and change the Custom Tool Namespace to the namespace you need.
Simple as that.