Is there a way to make Strongly Typed Resource files public (as opposed to internal)? Is there a way to make Strongly Typed Resource files public (as opposed to internal)? asp.net asp.net

Is there a way to make Strongly Typed Resource files public (as opposed to internal)?


Not sure which version of Visual Studio you are using, so I will put steps for either one:

VS 2008 - When you open the resx file in design view, there is an option at the top beside Add Resource and Remove Resource, called Access Modifier, it is a drop down where you can change the generated code from internal to public.

VS 2005 - You don't have the option to generate the code like in VS 2008. It was a feature that was added, because of this headache. There are work around's though. You could use a third party generator like this tool or you could use the InternalsVisibleTo attribute in your AssemblyInfo.cs to add the projects that will have access to the internal classes of your resource library.


Visual Studio 2008 allows you to select whether the generated resource class should be internal or public. There is also the ResXFileCodeGeneratorEx, which should do that for Visual Studio 2005.


From the dataset designer and with the properties window visible, there is a "Modifier" property. For your datasets, it is likely saying internal.

I don't know if there is a setting to default all new datasets to public.