i7 intel、Windows 7 Ultimate、VS2010 Ultimate でアプリを作成、ビルド、公開しています。このマシンでは、コードを使用するためにアプリが実行されます。別のマシンでは、なぜ動作しません。事前にありがとう、ocaccy。
if(!Directory.Exists("C:\\users"))
{
DirectoryInfo di=Directory.CreateDirectory("C:\\users");
}
IniFile ini=new IniFile("C:\\users\\monitoring_config.ini");
Error Message on created machine:
************** Exception text **************
System.NullReferenceException: Object reference not set to an instance of an object.
Local MonitorX.CommPort.Open()
Local MonitorX.Monitor.checkConfigINI()
Local MonitorX.Monitor.btn_Preferences_Click(Object sender, EventArgs e)
Local System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
Local System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
Local System.Windows.Forms.Control.WndProc(Message& m)
Local System.Windows.Forms.ButtonBase.WndProc(Message& m)
Local System.Windows.Forms.Button.WndProc(Message& m)
Local System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)..........................................................