Assembly Resource

  • Thread starter Thread starter Brady A. Williams
  • Start date Start date
B

Brady A. Williams

Something has mysteriously :) happened to my resource file and now in InitializeComponent() of my form, it is throwing a MissingManifestResourceException when it attempts to retrieve an ImageListStreamer from the ResourceManager (code snippet below). I opened the .resx file and verified the "imageList.ImageStream" data exists and it does.

ResourceManager resources = new ResourceManager(typeof(MyForm));
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"));
How can I fix this?

Regards,
Brady A. Williams
 
After using the Resource Editor to fix a corrupted .resx file and moving all type definitions below the target class (in my case the form) definition as described in this article: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318603.

Brady
Something has mysteriously :) happened to my resource file and now in InitializeComponent() of my form, it is throwing a MissingManifestResourceException when it attempts to retrieve an ImageListStreamer from the ResourceManager (code snippet below). I opened the .resx file and verified the "imageList.ImageStream" data exists and it does.

ResourceManager resources = new ResourceManager(typeof(MyForm));
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"));
How can I fix this?

Regards,
Brady A. Williams
 
Brady,

This exception is thrown also when the application is compiled against one version of a dll and tries to load the same dll, but with different version. In this case the application needs to be rebuild against the new version of the dill.

Ofcourse this might be not your problem, but it's worth to checked out.


--

Stoitcho Goutsev (100)

Something has mysteriously :) happened to my resource file and now in InitializeComponent() of my form, it is throwing a MissingManifestResourceException when it attempts to retrieve an ImageListStreamer from the ResourceManager (code snippet below). I opened the .resx file and verified the "imageList.ImageStream" data exists and it does.

ResourceManager resources = new ResourceManager(typeof(MyForm));
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"));
How can I fix this?

Regards,
Brady A. Williams
 
Back
Top