'System.Resources.MissingManifestResourceException'

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
I am working on a winforms project. There are couple of .bmp images in the
main form. Previously it was running ok. But today, I changed couple of
controls in the designer and then the following exception started to appear.
Does any one know how to work around this thing and why it is coming. One
thing that may be of interest to know that when I delete these picture
controls it stops. I am using VS.NET 2003 and framework verion 1.1.

Below is the line on which the following exception occurs.

this.MyPic.Image =
((System.Drawing.Image)(resources.GetObject("MyPic.Image")));

The exception that is thrown is:

An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll

Additional information: Could not find any resources appropriate for the
specified culture (or the neutral culture) in the given assembly. Make sure
"MyFrm.resources" was correctly embedded or linked into assembly "MyApp".
baseName: MyFrm locationInfo: MyApp.MyFrm resource file name:
MyFrm.resources assembly: MyApp, Version=1.0.2431.33755, Culture=neutral,
PublicKeyToken=null


Your Help will be greatly appriciated.
Thanks,
Nasir
 
Paraclete said:
I am working on a winforms project. There are couple of .bmp images in the
main form. Previously it was running ok. But today, I changed couple of
controls in the designer and then the following exception started to
appear.
Does any one know how to work around this thing and why it is coming. One
thing that may be of interest to know that when I delete these picture
controls it stops. I am using VS.NET 2003 and framework verion 1.1.

Below is the line on which the following exception occurs.

this.MyPic.Image =
((System.Drawing.Image)(resources.GetObject("MyPic.Image")));

The exception that is thrown is:

An unhandled exception of type
'System.Resources.MissingManifestResourceException' occurred in
mscorlib.dll


If you are using an application manifest file for "devenv.exe" in order to
enable Windows XP visual styles inside the IDE, remove the manifest file.
Maybe you'll have to recreate the forms' resources.
 
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager("MyApp.MyFrm",Assembly.GetExecutingAssembly());
//typeof(MyFrm));

try the above in place of typeof in your initializecomponent.

FUnky
 
Back
Top