我正在尝试运行较旧的 vb.net 代码,但它因此错误而中断(异常 System.Reflection.TargetInvocationException)。这是跟踪日志:
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()
第 160 行执行此任务 Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
我认为错误是由于这条线引起的,当我评论它时,一切运行良好。我怎样才能解决这个问题?