Hello,

I am getting these constant annoying errors in Visual Basic .NET 2010 Express. I'm pretty sure I'm not the only one, but these errors are always relating to images and resources!

The Type 'Global.ExampleProject.My.Resources.Resources' has no property named 'example.png'

I am pretty sure these are bug, due to the fact that I get these errors after a while in most of my projects - it's absolutely annoying! Most solutions include removing the resources (commenting them out of the form designer code) and re-importing them... But then the problem comes back again after the project has been loaded a few times!

Microsoft suggest this is rather a user-related issue rather than a bug due to the fact that they can't reproduce the error.

Argh! I'm still sticking to the belief of this being a bug - anyone get this error alot of the time?

This is not the only bug I get - sometimes VB stops working when I try to build my projects!

Note: I am not a novice, I know VB fairly well - and these errors a very strange.. which is why I believe their bugs! :@

Why not locate and remove any reference to Global.ExampleProject.My.Resources.Resources alltogether?
Is it essential for either your projects or the functionality of VS2010 Express in any way?

Why not locate and remove any reference to Global.ExampleProject.My.Resources.Resources alltogether?
Is it essential for either your projects or the functionality of VS2010 Express in any way?

also u can check just to ensure that u don't refer to example.png
if it still don't work maybe u could ask Microsoft whether this file exist and what is the purpose, so u can check the components in your projects who refer to it

Why not locate and remove any reference to Global.ExampleProject.My.Resources.Resources alltogether?
Is it essential for either your projects or the functionality of VS2010 Express in any way?

Is it essential? Yes. They are my resources for my project. They're the images and icons that I use on my forms. By removing lines of code referencing to these resources, my designer will remove those images and icons (resources) from the form.

also u can check just to ensure that u don't refer to example.png

I need to refer to example.png - it's an image that I imported on to my form.

if it still don't work maybe u could ask Microsoft whether this file exist and what is the purpose, so u can check the components in your projects who refer to it

I don't think you understand. I am not having problems with the files used by Visual Studio, I am getting Warnings from my compiler complaining that an image in my resources doesn't exist, yet when I open the designer for Resouces.resx, the images are there.

The only thing that Microsoft has to do with this issue is the fact that this bug (what I claim it to be) is restricting me from my work...

I will post an image or video link in about 10-12 hours to show you a better understanding of my problem. But thanks for your responses so far.

Why not locate and remove any reference to Global.ExampleProject.My.Resources.Resources alltogether?
Is it essential for either your projects or the functionality of VS2010 Express in any way?

Is it essential? Yes. They are my resources for my project. They're the images and icons that I use on my forms. By removing lines of code referencing to these resources, my designer will remove those images and icons (resources) from the form.

also u can check just to ensure that u don't refer to example.png

I need to refer to example.png - it's an image that I imported on to my form.

if it still don't work maybe u could ask Microsoft whether this file exist and what is the purpose, so u can check the components in your projects who refer to it

I don't think you understand. I am not having problems with the files used by Visual Studio, I am getting Warnings from my compiler complaining that an image in my resources doesn't exist, yet when I open the designer for Resouces.resx, the images are there.

The only thing that Microsoft has to do with this issue is the fact that this bug (what I claim it to be) is restricting me from my work...

I will post an image or video link in about 10-12 hours to show you a better understanding of my problem. But thanks for your responses so far.

Forgive me.
Based on the name of the resource Global.ExampleProject I assumed that it came from a Microsoft example project.

So. Here's another suggestion you can try.
Create a class library project where you store a bunch of resources and compile them into it as bitmaps, in the form of properties.
Then add the library as a reference to your current and future projects.
Voila, instant access to icons, images etc.

commented: Helpful Idea +1

Oxiegen, thanks for the idea. I created a new class, and changed the way the resource scheme works. Now, instead of using Microsoft's normal design:

PictureBox1.Image = My.Resources.Resources.TestImage

I have designed the new class, which I named Media rather than Resources so the code works as follows during coding;

PictureBox1.Image = My.Media.GetResource("TestImage").Image

It still has a few warnings that appear, but so far it has fixed my problem with Microsoft's auto-generated resource class, and the new class does in fact act just like a resource file and loads images, icons, etc. on to the form. I have chucked the resource file and am using my class instead.

Thanks for the help. Will keep you updated with the class development to let you know if it works fully. :icon_cheesygrin:

You're welcome.
Please mark this thread as solved if you have no other questions.

I just had this problem and fixed it by changing the Access Modifier on the image in question from 'Friend' to 'Public'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.