ImageList and MissingManifestResourceException

  • Thread starter Thread starter Zanna
  • Start date Start date
Z

Zanna

Hi,

I got a problem that I don't understand.

I placed an ImageList on my form, I added 4 icons to it (32*32) and all was
fine.
When I run the app it goes into exception (MissingManifestResourceException)
at the following line generated by VisualStudio:

this.ilIcons.Images.Add(((System.Drawing.Image)(resources.GetObject("resourc
e"))));

What was wrong?

What is that exception?
How can I see the resources of my app?

Thanks!
 
You can use ildasm tool shipped with Visual Studio to examine the resource
manifest in your assembly. By default you'll find it here:-
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin

One of the common errors with resources is when the Namespace changes and
the resource name specifed may be incorrect. You can also use
Assembly.GetManifestResourceNames from code to determine the names of all
the included resources in your assembly.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Peter Foot said:
One of the common errors with resources is when the Namespace changes and
the resource name specifed may be incorrect.

I think you're right: I examined the resources and them have the old form
name :(

But is it possible to change them to the right name?
It would be absurd if I had to refactor all the form...

Also I don't understand why at design time all is ok.

Thanks again
 
Peter Foot said:
One of the common errors with resources is when the Namespace changes and
the resource name specifed may be incorrect.

Well... can I know what damned names should have the resources?

I can't get images work! :(

Possible? I add an image ad design and at runtime it give me the
MissingManifestResourceException...


Thanks
 
Back
Top