Windows 응용 프로그램을 C#으로 만들고 있습니다. .NET Framework 3.5에서 한 응용 프로그램을 만들었고 Windows vista를 사용하고 있습니다. 응용 프로그램을 빌드하고 실행하려고합니다. 다른 컴퓨터에 윈도우 7 데, 그 working.The 대상 machine.The 문제는 내가 CONFIG file.if에서 일부 값을 읽으려고 할 때마다 제어 패널에 .NET Framework 4.0 클라이언트 프로필을 보여줍니다. 나는 설정 파일을 사용해야한다. 프레임 워크 문제를 확인을 위해 나는 내가 MessageBox.Show(ConfigurationManager.AppSettings["FlagForArchiving"].ToString());
으로 버튼 클릭에 설정 파일의 값을 읽을 것을 시도하고있는 간단한 응용 프로그램을 만든하지만 난 미리 내 problem.Thanks를 해결하기 위해 도와주세요구성 파일을 읽는 중 다른 컴퓨터에서 작동하지 않습니다
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at TestFramework.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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.239 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
TestFramework
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/mvi/AppData/Local/Temp/Temp1_test.zip/Release/TestFramework.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
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.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.236 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
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.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.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.
으로 오류를 얻고있다 .
설정 파일을 다른 컴퓨터에 복사 했습니까? 어떤 오류가 발생하고 있습니까? – zmbq
정확한 오류 로그를 작성하여 조사 할 수 있습니까? –
@ zmbq : 해당 응용 프로그램을 빌드 한 후 다른 컴퓨터에 별도의 구성 파일을 복사해야합니까? 내 설정 파일에 으로 값이 있습니다. appSettings> 그리고 언제든지 내 응용 프로그램을 실행하려고 할 때마다 FileNotFoundException 오류가 나타납니다. –
Dany