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
In VS2013, 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".
If it does not work just try putting there "My." - Just this "My."
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)
The above is a valid solution but I noticed in my case that the error resulted from another issue. Sometimes what we think is the error is actually the result of a preceding error. You can get this error as well if you deleted the resources from the Resource folder in the Solution Explorer. If you intended on removing these resources then you need to actually delete them by clicking the "Remove Resource" button in the Resources section of your project properties. This will then remove traces of the missing item in the underlying auto-generated code. After clearing an icon resource file that was deleted improperly I no longer had an issue with VS losing reference to My.Resources.
Hope that helps someone.
Update: I also received this error when I added a resource file to my project when it was open in another program. In my case I added a User Manual word document but it was still open in Word. All I had to do to remedy this issue was delete the word document out of my resources, close it in Word and re-add it again. Once I built the solution the errors went away.
See the below solution and this what I did.
PBImage.Image = Global.ProjectName.My.Resources.Resources.PictureName
Had more luck changing "My.Resources
" to "MyResources
"
and changing the Access Modifier of "Resources.resx
" to Public (it was previusly Friend Access Modifier)
Fixed the error for me
Ran Into the Same Error
Solution path