954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VB.NET 2010 Constant Errors - Bugs?

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! :@

ZNERB
Newbie Poster
6 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

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?

Oxiegen
Master Poster
715 posts since Jun 2006
Reputation Points: 87
Solved Threads: 141
 
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

asaukani
Light Poster
44 posts since Mar 2010
Reputation Points: 13
Solved Threads: 9
 
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 toexample.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 animage 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.

ZNERB
Newbie Poster
6 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 
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 toexample.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 animage 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.

ZNERB
Newbie Poster
6 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

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.

Oxiegen
Master Poster
715 posts since Jun 2006
Reputation Points: 87
Solved Threads: 141
 

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 namedMedia 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:

ZNERB
Newbie Poster
6 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

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

Oxiegen
Master Poster
715 posts since Jun 2006
Reputation Points: 87
Solved Threads: 141
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: