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

后端 未结 23 1200
醉话见心
醉话见心 2021-01-17 09:54

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

23条回答
  •  滥情空心
    2021-01-17 10:31

    I face this problem all the time and this solution works for me all the time.

    1. Click on Show All Files in solution explorer.

    2. Navigate to file named "Resources.resx" under "My Project" folder.

    3. In properties for that file rename the file's [Custom Tool Namespace] to anything other than "My.Resources". (I name it to "My.Resource").

    4. Clean and Rebuild the solution.

    5. Navigate back to "Resources.resx" in properties. Rename the file's [Custom Tool Namespace] back to "My.Resources".

    6. Clean and build the solution again.

    Your problem should be fixed.

提交回复
热议问题