My form's resx file is losing resources that I have added with ResEditor.exe
(the utility that ships with VS.Net. Here is what is happening: I add the
icon to the .resx file with no problems. My app calls the resource, using
the following code:

System.Resources.ResourceManager resources = new
System.Resources.ResourceManager(this.GetType());
this.Icon = (System.Drawing.Icon)resources.GetObject("Scenario.Icon");

The call works fine, but the icon is deleted from the .resx file. If I try
to call up the resource again, it's not found. I confirmed with
ResEditor.exe that the icon is no longer in the .resx file.

Can anyone tell me why this is happening? Thanks.

Dave Veeneman
Foresight Systems

Re: Resx losing resources? by Dave

Dave
Thu May 13 18:42:33 CDT 2004

I think I found my answer. Resources were disappearing during debugging,
when the runtime threw an exception. I added a call to the Resource
Manager's ReleaseAllResources() method immediately after I read the icon,
and the problem went away.