Problems With Resource

curlydog

Well-known member
Joined
Jul 5, 2010
Messages
50
Programming Experience
Beginner
I have a vb forms project which uses images within application resources. I did a bit of tidying up and deleted some resources which weren't used. I then stated getting some error messages. I decided to add some of the resources again as I had deleted some which were still being used.

This has caused me no end of problems. Firstly;
If I try and add an image that I had previously deleted I get an alert saying a resource with the same name already exists. I click to replace. The resource does not appear in the resource tab within the project properties, but does appear in the resources folder in the solution explorer. In the resources tab within the project properties I see a red exclamation mark next to where I should see my image. When I hover over it I get a message saying "Resource 'handset' could not be instantiated. the resource value contains invalid data or has an incorrect format"

The second problem relates to the Resources.designer.vb file. I say file, as I now have eleven of them numbered Reources.Designer.vb, Resources1.Designer.vb right up to Resources11.Designer.vb. It appears that when I make changes within my resources another one of these files is produced, although I can't determine exactly what triggers it.

These files are also producing errors. "Error 46 module 'Resources' and module 'Resources', declared in 'C:\Users\jason\Documents\Visual Studio 2010\Projects\Mi2\Mi2\My Project\Resources.Designer.vb', conflict in namespace 'Resources'."

When I double click the error I'm taken to one of the duplicate files. If I change the line "Public Module Resources" by adding the number of the corresponding duplicate (for example by changing it to "Public Module Resources11") the error disappears.

I've now spent two days trying to resolve this issue. Is there a way to consolidate all of these Resources.Designer.vb files into one? as this seems to be the source of my problems.

Many thanks
Jason
 
Back
Top