English 中文(简体)
A. 初始供应商的申请坠毁
原标题:Application crashes in InitializeComponent()

首先,使用“2010年”演播室的Im,。 Measurement 《2010年演播室原始数据、C#和NET 4.0》。

我的申请从一个USB装置中获得数据,并用一个<代码>WaveformPlot()(作为计量工作室的一部分)获得数据。 I m 能够以欺骗和释放方式对申请进行罚款,甚至可以直接使用发展计算机上的EXE文档bin/code>。

然而,我根本无法以不同的计算机操作。 I m using ClickOnce,以创建安装文档和复印机,并抄录从我的开发计算机到客户电脑的出版夹。 然后,我管理着安装文件,ClickOnce下载。 NET(如果尚未安装),然后开放申请。 申请表明,我最初的道歉要求我从许多现有港口选择一个COM港。 一旦我这样做,我的代码就通过<代码>InitializeComponent(,之后主要表格应显示。

主要表格在最初的盒子之后打开。 缩略语

this.waveformPlot = new NationalInstruments.UI.WaveformPlot();

它在此坠毁。 它没有向我显示任何错误的信息或东西。 该公司在我的开发计算机上,而不仅仅是在其他电脑上,进行罚款。 我包括:DL文档和其他国家文书组成部分被初步罚款。 这只是一纸空文。 申请显示视窗任务主管有一段时间,然后在10秒后便消失。

我应该做些什么?

<><>Update 1

在阅读了另一个与Stack Overflow无关的问题之后,我认识到,我可以把<条码>Application.run和<条码>格式1的主要格式=1()放在一个试捕组。

系统.TypeInitialization 例外: 国家入侵的初始动力。 UI.Internal. 浪 况 PlotElement threw and exception. - ; 不能装货或组装国家入侵。 共同点。 具体模块无法找到。

自2006年以来 我至少知道这只是一个例外,我就此做了工作,试图说明谁是利比里亚失踪人员,为什么并更新这个问题。

<><>Update 2

我检查了出版文件夹中的申请档案,其中的确包括国家入侵。 共同点。 我不知道它为什么能够装上它。

<><>Update 3

我对客户计算机进行了合并记录,认为National Instruments.Common.Native.dll已装满。 但是,正如《任择议定书》所显示的那样,死灰复燃的例外情况信息仍然显示出来,

不能装载档案或组装 National Instruments.Common.Native.dll or one of its Dependencies”


Fuslog 观点显示,所有集会均已成功装满。 我对客户电脑进行了检查。 虽然《国家文书》DL文件有一条行文,说“GAC看不成功”,而其他集会则没有成功。

DebugViewer展示了我用打印的例外情况。 Debug.writeLine 。 这表明National Instruments.Common.Native.dll 或者不能装上其附属地之一。

我感到非常困惑。


我尝试在提及该项目时添加提及内容,利用其他安装方案(除ClickOnce外)对参考资料进行核对,而且似乎没有一个设施在任何地方找我。


www.un.org/Depts/DGACM/index_spanish.htm 附录4

I just found out yesterday that the application was installing and running fine on 64-bit systems. The two computers I tried it on before were 32-bit Windows 7 systems. I am looking to see if that could help me somehow. The application was compiled on my 64-bit Windows 7 development laptop. The Platform drop down menu in Build under project properties shows Active (x86) and I have Any CPU as the platform target.

最佳回答

在就这一问题花费大量时间之后,我与来自国家文书的人进行了交谈,他帮助我解决了我提出的问题。 此前,我通过检查<代码>mstudiocommon.2010.msm的模块属性,注意到该模块(mstudiocommon.2010.msm)正在寻找vs100_crt_x86.msm文档,但安装者已检测(并添加)(安装者项目发现属地)。 安装装置项目安装正确,加上VS100 .msm文档,人工确定了我正在处理的问题。

Below, is a screenshot of the module dependencies that I could see for the mstudiocommon and mstudioui merge modules: Screenshot of the module dependencies that I could see for the <code>mstudiocommon</code> and <code>mstudioui</code> merge modules.

虽然我很不理解视觉演播室为何在检测VS90而不是VS100,但我很高兴我最终确定这一问题,我又把这个问题留给了一天。

问题回答

Trygamlog Viewer from SDK to identifying which Library causes the problem.

没有标志和错误信息,就很难找到错误。 在你试图查阅图书馆各组成部分<代码>waveformPlot并印刷错误信息和插图时,你应在你的代码中设置一个<条码> 渔获<>>。 你们可以看到什么是失踪的。

You can use use either Reflector or JustDecompile to get what references NationalInstruments.Common.Native.dll needs. From the sounds of it though with the word Native in the name of the DLL it maybe a wrapper around someother native Win32 C dll. Do you have those in the same folder? It may also be a wrapper around a COM dll which maybe is not registered?

I think what happen is that someone have installed application on target system that is using only subset of latest NI components. To fix this issue I have added bindingRedirect to app.config. It worked.

<?xml version="1.0"?>
<configuration>
 <startup>
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
 </startup>
 <runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
   <dependentAssembly>
    <assemblyIdentity name="NationalInstruments.Common" publicKeyToken="DC6AD606294FC298" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-13.0.40.190" newVersion="9.1.40.159"/>
   </dependentAssembly>
   <dependentAssembly>
    <assemblyIdentity name="NationalInstruments.Common.Native" publicKeyToken="DC6AD606294FC298" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-13.0.40.190" newVersion="9.1.40.159"/>
   </dependentAssembly>
  </assemblyBinding>
 </runtime>
</configuration>




相关问题
Bring window to foreground after Mutex fails

I was wondering if someone can tell me what would be the best way to bring my application to the foreground if a mutex was not able to be created for a new instance. E.g.: Application X is running ...

How to start WinForm app minimized to tray?

I ve successfully created an app that minimizes to the tray using a NotifyIcon. When the form is manually closed it is successfully hidden from the desktop, taskbar, and alt-tab. The problem occurs ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

Handle DataTable.DataRow cell change event

I have a DataTable that has several DataColumns and DataRow. Now i would like to handle an event when cell of this DataRow is changed. How to do this in c#?

Apparent Memory Leak in DataGridView

How do you force a DataGridView to release its reference to a bound DataSet? We have a rather large dataset being displayed in a DataGridView and noticed that resources were not being freed after the ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.

热门标签