Visual Studio - Resx File default 'internal' to 'public' Visual Studio - Resx File default 'internal' to 'public' asp.net asp.net

Visual Studio - Resx File default 'internal' to 'public'


Instead of the ResXFileCodeGenerator, use the PublicResXFileCodeGenerator.

You can do this by setting this as the Custom Tool property in the Property Window for the Resx file you want public access to.

Edit: Alternatetively you can set the Access Modifier to public when you open the resx file in Visual Studio. The Access Modifier dropdown box can be found at the top of the form.


  1. Right click on Resource file ( resource.resx ) => Properties.

  2. Custom Tool => Change to PublicResXFileCodeGenerator


Perhaps the easiest way is to create a derived class with a Public ctor?

The generated class:

 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]    internal Strings() {    }

The derived class:

public class PublicStrings : Strings{    /// <summary>    /// Public localization Strings.    /// </summary>    public PublicStrings()    {    }}