2014-03-06 69 views
0

我在另一台计算机上运行我的程序时遇到以下错误。 请帮我解决。安装VB电源组解决了一些我的问题,但仍然有在vb.net中运行程序时出错

我已经安装了正确的.NET框架上的一些部分,这些错误太

************** Exception Text ************** 
System.InvalidOperationException: Collection was modified; enumeration operation may not execute. 
    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 
    at System.Collections.Generic.List`1.Enumerator.MoveNextRare() 
    at System.Collections.Generic.List`1.Enumerator.MoveNext() 
    at Microsoft.VisualBasic.PowerPacks.ShapeCollection.Dispose(Boolean disposing) 
    at Microsoft.VisualBasic.PowerPacks.ShapeContainer.Dispose(Boolean disposing) 
    at System.ComponentModel.Component.Dispose() 
    at System.Windows.Forms.Control.Dispose(Boolean disposing) 
    at System.ComponentModel.Component.Dispose() 
    at System.Windows.Forms.Control.Dispose(Boolean disposing) 
    at System.ComponentModel.Component.Dispose() 
    at System.Windows.Forms.Control.Dispose(Boolean disposing) 
    at System.Windows.Forms.Form.Dispose(Boolean disposing) 
    at MMS.frmworkcategory.Dispose(Boolean disposing) in D:\vss\project_work\MMSs (2)_working\MMS\frmworkcategory.Designer.vb:line 13 
    at System.ComponentModel.Component.Dispose() 
    at System.Windows.Forms.Form.WmClose(Message& m) 
    at System.Windows.Forms.Form.WndProc(Message& m) 
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 


************** Loaded Assemblies ************** 
mscorlib 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.18449 built by: FX451RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll 
---------------------------------------- 
MMS 
    Assembly Version: 1.0.0.0 
    Win32 Version: 1.0.0.0 
    CodeBase: file:///C:/Program%20Files/office/MMS.exe 
---------------------------------------- 
Microsoft.VisualBasic 
    Assembly Version: 10.0.0.0 
    Win32 Version: 11.0.50709.17929 built by: FX45RTMREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll 
---------------------------------------- 
System 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.18045 built by: FX45RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll 
---------------------------------------- 
System.Core 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll 
---------------------------------------- 
System.Windows.Forms 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.18046 built by: FX45RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll 
---------------------------------------- 
System.Drawing 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.18022 built by: FX45RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 
---------------------------------------- 
System.Configuration 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.18058 built by: FX45RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll 
---------------------------------------- 
System.Xml 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.18058 built by: FX45RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll 
---------------------------------------- 
System.Runtime.Remoting 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll 
---------------------------------------- 
bll 
    Assembly Version: 1.0.0.0 
    Win32 Version: 1.0.0.0 
    CodeBase: file:///C:/Program%20Files/office/bll.DLL 
---------------------------------------- 
System.Data 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.18046 built by: FX45RTMGDR 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll 
---------------------------------------- 
System.Transactions 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll 
---------------------------------------- 
System.EnterpriseServices 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll 
---------------------------------------- 
System.Numerics 
    Assembly Version: 4.0.0.0 
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL 
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll 
---------------------------------------- 
Microsoft.VisualBasic.PowerPacks.Vs 
    Assembly Version: 10.0.0.0 
    Win32 Version: 10.0.20911.1 
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic.PowerPacks.Vs/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.PowerPacks.Vs.dll 
---------------------------------------- 

************** JIT Debugging ************** 
To enable just-in-time (JIT) debugging, the .config file for this 
application or computer (machine.config) must have the 
jitDebugging value set in the system.windows.forms section. 
The application must also be compiled with debugging 
enabled. 

For example: 

<configuration> 
    <system.windows.forms jitDebugging="true" /> 
</configuration> 

When JIT debugging is enabled, any unhandled exception 
will be sent to the JIT debugger registered on the computer 
rather than be handled by this dialog box. 
+0

集合被修改了....简单的有。每个代码里面的代码去掉枚举的元素在哪里? – Steve

+0

请发布代码并突出显示哪些代码行失败 –

+0

对不起,我不明白。我使用Visual Studio的GUI设计制作了我的软件,并且很少编码完成..请简化 在我的计算机中运行的编码相同的程序 – user3387700

回答

0

此错误,当你做这样的事情最有可能发生的情况:

For Each Item in Collection 
Collection.Remove(Item) 
Next 

如果您在迭代集合时没有添加/删除东西,请仔细检查您的代码。

+0

非常感谢。这个问题是因为DATA_GRID_VIEW中没有记录,我仍然使用这个命令......关心 – user3387700

3

从窗体中删除形状(Toolbox Visual Basic PowerPacks 10)后似乎不再出现该错误。

我的测试设备是安装了PowerPack 10的Win10 Tab。我的软件是用VS2012开发的。