1

I'm browsing through the System.Web.Mvc library and I don't know how to navigate to the resource files.

I see a line of code like this...

throw new ArgumentException(MvcResources.Common_NullOrEmpty, "contentPath");

So I click through on Common_NullOrEmpty, which brings here

// System.Web.Mvc.Resources.MvcResources
internal static string Common_NullOrEmpty
{
    get
    {
        return MvcResources.ResourceManager.GetString("Common_NullOrEmpty", MvcResources.resourceCulture);
    }
}

I've tried searching for Common_NullOrEmpty with no results.

Where are these resources buried? and more importantly, how would I go about finding this on my own?

joelnet
  • 13,621
  • 5
  • 35
  • 49

1 Answers1

4

You can find the resources under the Assembly in the Tree View:

Resources

You are then shown a table on the right with all the strings in:

Resource Strings

Sometimes I have to click "Save" at the top of the Resource View and look at them in NotePad++ if I cannot find them in that list.

DaveShaw
  • 52,123
  • 16
  • 112
  • 141
  • Wow, you answered so fast I can't "accept as an answer" for another 6 minutes. Another feature hidden in plain sight. Thanks! – joelnet May 16 '12 at 06:20
  • 2
    Thanks, I hope they add a search feature to the Resource Strings, then it would be perfect. – DaveShaw May 16 '12 at 08:03
  • @Dave, hi as Microsoft has opened source the MVC framework now, I have a question, how could I access the MvcResources class from inside my own custom html helper method? Thank you! – VincentZHANG May 23 '17 at 23:16