title: System.InvalidOperationException: Loading of the ImageList did not succeed
body: <p>Stacktrace:</p>
  
  <pre><code>System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; System.InvalidOperationException: Loading of the ImageList did not succeed.
  at System.Windows.Forms.ImageListStreamer..ctor(SerializationInfo info, StreamingContext context)
  --- End of inner exception stack trace ---
  at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct&amp; declaringTypeSig, SerializationInfo info, StreamingContext context)
  at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
  at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object 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(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
  at System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)
  at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode&amp; typeCode)
  at System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode&amp; typeCode)
  at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString)
  at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase)
  at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
  at System.Resources.ResourceManager.GetObject(String name)
  at MyClass.InitializeComponent()
  at MyClass..ctor()
  </code></pre>
  
  <p>This exception is thrown by designer generated code, when opening a new tab, that contains a custom UserControl of the type MyClass somewhere down the control hiearchy. If this exception occured once, it will occur everytime this tab is opened again. Other tabs, that contain UserControls with ImageLists, load without throwing an exception, even after that one UserControl throws this exception on opening. This error only occurs after some time using the program and opening and closing this and other tabs.</p>
  
  <p>No limits on windows resources are hit:
  USER objects are at 1095, GDI objects at 593, Handles at 831 and process memory at 162.704 K.
  The system is Windows 7 and the application is targeting .NET Framework 2.0.</p>
  
  <p>I couldn't find anything, that matches my problem. I found only some cases about .NET framework version below 2.0, about memory or resource leaks, about problems on Windows XP, about threading issues and about manifest files. How do I find the cause for this problem?</p>