I m trying to run an older vb.net code but it breaks with this error (exception System.Reflection.TargetInvocationException). Here's the tracelog:
Source="mscorlib" StackTrace:
à System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
à System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
à System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
à System.Runtime.Serialization.ObjectManager.DoFixups()
à System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
à System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
à System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)
à System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
à System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString)
à System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
à JMF.MDIContainer.InitializeComponent() dans C:\JMF\SOURCES\JMF\Menu.vb:ligne 160
à JMF.MDIContainer..ctor() dans C:\JMF\SOURCES\JMF\Menu.vb:ligne 73
à JMF.MDIContainer.Main() dans C:\JMF\SOURCES\JMF\Menu.vb:ligne 187
à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
The line #160 performs this task Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
I think the error is due to this line cause when I comment it, everything runs well. How can I fix this?