.netvb.net

How to fix the 'Resources' is not a member of 'My'


I am using VS2010 and in all of my projects "My.Resources" is available and shows all the files that are in the "resources" section of the project. In this one project I have a bunch of resource files in the project but the compiler complains:

'Resources' is not a member of 'My'

Where I do:

Private lockedImage = My.Resources.myfile

How do I fix this?


Solution

  • In VS2010 Look in the Solution Explorer at [Your Project] -> My Project -> Resources.resx. Click on "Properties" and make sure that "Custom Tool Namespace" says "My.Resources". (took me an hour to figure this out)