2012-09-28 56 views
0

我正在嘗試爲我正在製作的遊戲製作啓動程序。該程序在我的另一臺電腦上工作得很好。我最近將源代碼轉移到了我的電腦上。我遇到問題,但我嘗試調試應用程序,並且出現此錯誤。其他電腦的VB.NET程序崩潰

我想出了這個問題。此代碼在這裏

.GetVersionInfo("C:\Users\eriger777\Desktop\test\bin\Launcher.exe") 

正試圖執行不在那裏的文件:3。

An error occurred creating the form. 

下面是導致錯誤的代碼。

  <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ 
    Protected Overrides Sub OnCreateMainForm() 
     Me.MainForm = Global.Launcher.frmMain 
    End Sub 
End Class 

堆棧跟蹤

at Launcher.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 
    at Launcher.My.MyProject.MyForms.get_frmMain() 
    at Launcher.My.MyApplication.OnCreateMainForm() in C:\Users\Gryphon\Downloads\Launcher\Launcher Source Main\Launcher Source\My Project\Application.Designer.vb:line 35 
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() 
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() 
    at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) 
    at Launcher.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 
    at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) 
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
    at System.Threading.ThreadHelper.ThreadStart() 
+0

你是否實例化了frmMain類?嗯,這並不能解釋它如何在你的其他電腦上工作...我會在這裏開始調查:'C:\ Users \ Gryphon \ Downloads \ Launcher \ Launcher Source Main \ Launcher Source \ My Project \ Application.Designer.vb:第35行' –

+0

是的,我相信是的。就像我說的那樣在我的另一臺電腦上工作。但它不適用於新的。 –

+1

您是否使用任何可能未在新計算機上註冊的ActiveX控件或Dll? –

回答

0

我想通了這個問題。此代碼在這裏

.GetVersionInfo( 「C:\用戶\ eriger777 \桌面\測試\ BIN \的Launcher.exe」) 試圖執行一個未出現一個文件:3。