以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 升级.net 4.0后第三方控件关闭时报错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=136380) |
||||
-- 作者:grvictor -- 发布时间:2019/6/12 11:50:00 -- 升级.net 4.0后第三方控件关闭时报错 我在项目中引用了 winhtmledit 控件,之前可以正常使用,升级4.0后,关闭时报错,错误代码如下: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.NotSupportedException: Collection is read only. at System.Windows.Forms.ToolStripContainer.ToolStripContainerTypedControlCollection.Remove(Control value) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0, Control A_1) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0, Control A_1) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0, Control A_1) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0, Control A_1) at Foxtable.o_0__0_o.o0___oO0(ControlCollection A_0) at Foxtable.WinForm.Form.o_o_0__0(Object A_0, EventArgs A_1) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Control.OnParentChanged(EventArgs e) at System.Windows.Forms.ContainerControl.OnParentChanged(EventArgs e) at System.Windows.Forms.Control.AssignParent(Control value) at System.Windows.Forms.Control.ControlCollection.Remove(Control value) at System.Windows.Forms.Form.ControlCollection.Remove(Control value) at System.Windows.Forms.Control.ControlCollection.Clear() at Foxtable.WinForm.Form.O O0O o(Object A_0, FormClosedEventArgs A_1) at System.Windows.Forms.Form.OnFormClosed(FormClosedEventArgs e) at System.Windows.Forms.Form.CheckCloseDialog(Boolean closingOnly) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.7.3416.0 built by: NET472REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- Foxtable Assembly Version: 2019.6.13.1 Win32 Version: 2019.06.13.1 CodeBase: file:///C:/foxtable/Development/foxtable.exe ---------------------------------------- Foxtable.Lib Assembly Version: 2019.6.12.1 Win32 Version: 2019.06.12.1 CodeBase: file:///C:/foxtable/Development/Foxtable.Lib.DLL ---------------------------------------- Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 14.7.3056.0 built by: NET472REL1 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.7.3416.0 built by: NET472REL1LAST_B 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.7.3362.0 built by: NET472REL1LAST_C 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.7.3324.0 built by: NET472REL1LAST_C 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.7.3056.0 built by: NET472REL1 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.7.3056.0 built by: NET472REL1 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.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- C1.Win.C1Ribbon.4 Assembly Version: 4.0.20191.359 Win32 Version: 4.0.20191.359 CodeBase: file:///C:/foxtable/Development/C1.Win.C1Ribbon.4.DLL ---------------------------------------- Interop.JinDI_SmsComLib Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/foxtable/Development/Interop.JinDI_SmsComLib.DLL ---------------------------------------- System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.7.3260.0 built by: NET472REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- C1.Win.C1Command.4 Assembly Version: 4.0.20191.359 Win32 Version: 4.0.20191.359 CodeBase: file:///C:/foxtable/Development/C1.Win.C1Command.4.DLL ---------------------------------------- System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll ---------------------------------------- System.Management Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll ---------------------------------------- System.Transactions Assembly Version: 4.0.0.0 Win32 Version: 4.7.3221.0 built by: NET472REL1LAST_C 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.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll ---------------------------------------- C1.Win.4 Assembly Version: 4.0.20191.359 Win32 Version: 4.0.20191.359 CodeBase: file:///C:/foxtable/Development/C1.Win.4.DLL ---------------------------------------- Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll ---------------------------------------- C1.Win.C1FlexGrid.4 Assembly Version: 4.0.20191.359 Win32 Version: 4.0.20191.359 CodeBase: file:///C:/foxtable/Development/C1.Win.C1FlexGrid.4.DLL ---------------------------------------- Foxtable.Blank Assembly Version: 0.0.0.0 Win32 Version: 2019.06.13.1 CodeBase: file:///C:/foxtable/Development/foxtable.exe ---------------------------------------- Interop.MSScriptControl Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/foxtable/Development/Interop.MSScriptControl.DLL ---------------------------------------- C1.Win.C1Input.4 Assembly Version: 4.0.20191.359 Win32 Version: 4.0.20191.359 CodeBase: file:///C:/foxtable/Development/C1.Win.C1Input.4.DLL ---------------------------------------- Foxtable.Ribbon Assembly Version: 0.0.0.0 Win32 Version: 2019.06.13.1 CodeBase: file:///C:/foxtable/Development/foxtable.exe ---------------------------------------- System.Web Assembly Version: 4.0.0.0 Win32 Version: 4.7.3282.0 built by: NET472REL1LAST_B CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll ---------------------------------------- Foxtable.Blank Assembly Version: 0.0.0.0 Win32 Version: 2019.06.13.1 CodeBase: file:///C:/foxtable/Development/foxtable.exe ---------------------------------------- Office2007Renderer Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/foxtable/Development/Office2007Renderer.DLL ---------------------------------------- Neodynamic.WinControls.BarcodeProfessional Assembly Version: 10.0.2000.0 Win32 Version: 10.0.2018.508 CodeBase: file:///C:/foxtable/Development/Neodynamic.WinControls.BarcodeProfessional.DLL ---------------------------------------- fjrqntvc Assembly Version: 0.0.0.0 Win32 Version: 4.7.3416.0 built by: NET472REL1LAST_B CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- qeat3rku Assembly Version: 0.0.0.0 Win32 Version: 4.7.3416.0 built by: NET472REL1LAST_B CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing.Design Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 built by: NET472REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll ---------------------------------------- 管理项目1.Form.93dbfe97 Assembly Version: 0.0.0.0 Win32 Version: 2019.06.13.1 CodeBase: file:///C:/foxtable/Development/foxtable.exe ---------------------------------------- C1.Win.C1Chart.4 Assembly Version: 4.0.20191.359 Win32 Version: 4.0.20191.359 CodeBase: file:///C:/foxtable/Development/C1.Win.C1Chart.4.DLL ---------------------------------------- WinHtmlEditor Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/foxtable/Development/WinHtmlEditor.DLL ---------------------------------------- NetSpell.SpellChecker Assembly Version: 2.1.7.39341 Win32 Version: 2.1.7.39341 CodeBase: file:///C:/foxtable/Development/NetSpell.SpellChecker.DLL ---------------------------------------- Microsoft.mshtml Assembly Version: 7.0.3300.0 Win32 Version: 7.0.3300.0 CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll ---------------------------------------- Microsoft.CSharp Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll ---------------------------------------- System.Dynamic Assembly Version: 4.0.0.0 Win32 Version: 4.7.3056.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll ---------------------------------------- Anonymously Hosted DynamicMethods Assembly Assembly Version: 0.0.0.0 Win32 Version: 4.7.3416.0 built by: NET472REL1LAST_B CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.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. [此贴子已经被作者于2019/6/12 12:42:01编辑过]
|
||||
-- 作者:有点甜 -- 发布时间:2019/6/12 12:36:00 -- 提示说【Collection is read only】,集合只读不能移除remove。
具体做个实例发上来测试。 |
||||
-- 作者:grvictor -- 发布时间:2019/6/12 12:43:00 -- 回复:(有点甜)提示说【Collection is read only】,...
|
||||
-- 作者:有点甜 -- 发布时间:2019/6/12 12:47:00 --
其中 Sonic.HtmlEditor.dll 你需要用 .net 4.0 的版本,不能用旧版本
|
||||
-- 作者:grvictor -- 发布时间:2019/6/12 13:03:00 -- 回复:(有点甜) 其中 Sonic.HtmlEditor.dll ... 还是不行,不是这个问题,这个好像是 Foxtable 的那个winform类继承了windows.form类,在关闭Form的时候会主动移除ToolStripContainer里面的内容,这块报错了。 |
||||
-- 作者:有点甜 -- 发布时间:2019/6/12 14:58:00 -- 以下是引用grvictor在2019/6/12 13:03:00的发言:
还是不行,不是这个问题,这个好像是 Foxtable 的那个winform类继承了windows.form类,在关闭Form的时候会主动移除ToolStripContainer里面的内容,这块报错了。
你给的项目无法直接测试,请上传可以正确打开测试的项目。
|
||||
-- 作者:grvictor -- 发布时间:2019/6/12 15:17:00 -- 就是文件夹里那个DLL,引用之后在A表的窗口1中。因为那个引用DLL不发布的话就在C盘FOXTABLE那个文件夹下面。 我刚才又测试了下,还是不行。我想到了一个折中的办法,就是在窗口beforecloseform事件中,删掉这个控件。请问一下我在这个事件中怎么获取到控件,因为好像没有写窗口全局代码的地方.....
|
||||
-- 作者:有点甜 -- 发布时间:2019/6/12 15:25:00 -- 以下是引用grvictor在2019/6/12 15:17:00的发言:
就是文件夹里那个DLL,引用之后在A表的窗口1中。因为那个引用DLL不发布的话就在C盘FOXTABLE那个文件夹下面。 我刚才又测试了下,还是不行。我想到了一个折中的办法,就是在窗口beforecloseform事件中,删掉这个控件。请问一下我在这个事件中怎么获取到控件,因为好像没有写窗口全局代码的地方.....
只有一个dll,会提示报错,请把相关的对应的dll都发上来。 |
||||
-- 作者:狐狸爸爸 -- 发布时间:2019/6/12 16:10:00 -- 可以在窗口的Beforeclose事件中用自己的代码移除第三方控件。 |