System.InvalidOperationException: Failed to load ImageList

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?
 
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top