System.InvalidOperationException: Failed to load ImageList

  • Thread starter Thread starter Jose M. Aragon
  • Start date Start date
J

Jose M. Aragon

I get the following exception when I try to run a c# winform app that
includes an imagelist:



An unhandled exception of type 'System.Reflection.TargetInvocationException'
occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an
invocation.

Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.InvalidOperationException: Failed to load ImageList.
at System.Windows.Forms.ImageListStreamer..ctor(SerializationInfo info,
StreamingContext context)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object
target, SerializationInfo info, StreamingContext context)
at
System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Objec
t obj, SerializationInfo info, StreamingContext context)
at
System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder
holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializatThe program '[3728] TestImageList.exe' has exited with code
0 (0x0).
ionStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage
methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream)
at System.Resources.ResourceReader.LoadObject(Int32 pos)
at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean
ignoreCase)
at System.Resources.ResourceManager.GetObject(String name, CultureInfo
culture)
at System.Resources.ResourceManager.GetObject(String name)
at TestImageList.Form1.InitializeComponent() in
d:\box\test\testimagelist\form1.cs:line 66
at TestImageList.Form1..ctor() in d:\box\test\testimagelist\form1.cs:line 26
at TestImageList.Form1.Main() in d:\box\test\testimagelist\form1.cs:line 108


Machine: Windows 2003 Advanced Server + Visual Studio .NET 2003 Enterprise

I have seen something like a bug from
http://support.microsoft.com/default.aspx?scid=kb;EN-US;813967
but it refers to .NET Framework 1.0 with SP2.

Any Idea?
 
I get the same problem.
I recently installed the GDI+ security update. Could that have to do
anything with this problem?
Found a solution?
 
Back
Top