2012-11-28 69 views
0

我有兩個桌面應用程序(可以說'x'和'y')。兩者均使用visual studio 2008 vb.net語言編寫。兩者都具有相同的引用,相同的所有設置(逐步檢查),都在同一臺機器上編譯(w7),但只有一個('x')在所有其他機器上工作(和w7和xp) y')只能在w7上工作。我錯過了什麼?我得到錯誤('Y')在XP上這樣我們An unhandled exception ('System.InvalidOperationException') occurred in OVA.exe [4020]. Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging can be enabled from Tools/Options/Debugging/Just-In-Time. 正如我所說的設置是相同的(除名稱和來源位置不同夫婦文件夾)。即時調試已啓用。我甚至評論了應用程序'y'中的所有代碼,只留下了沒有事件處理的表單。visual studio編譯的應用程序不能在xp上工作

+0

我猜你的簡碼'w7'是指'Windows 7','xp'是指'Windows XP',對吧? – Raptor

+0

是目標框架也一樣嗎?嘗試記錄[未處理的異常](http://www.switchonthecode.com/tutorials/csharp-tutorial-dealing-with-unhandled-exceptions)它可能會幫助你。 – Rafal

+0

是的,目標框架也一樣 – babboon

回答

0

根據http://msdn.microsoft.com/en-us/library/system.invalidoperationexception.aspx

"The exception that is thrown when a method call is invalid for the object's current state." 

看到你註釋掉的事件處理程序,只留下形式。它可能是其中一個控件的初始化。或者你在New()函數中做了什麼特別的事情?如果是的話,你可以在這裏粘貼?

+1

問題很有意思:xp機器不喜歡窗體的圖標。我刪除了用過的圖標,設置了默認的一個 - 一切都變得完美了。 – babboon

相關問題