我有從命令行啓動Visual Studio的如下構建腳本:的Visual Studio 2015年退出代碼0xE0434352
devenv.exe <project file> /Rebuild "Release" /Project <project name> /UseEnv /Out <log file>
在完成腳本檢查從Visual Studio的退出代碼。
我們已經從Visual Studio 2010更新到2015.大多數項目編譯時沒有問題,但有些退出代碼爲0xE0434352,我相信這是System.InvalidOperationException。
Windows事件日誌中顯示兩個條目:
Faulting application name: devenv.exe, version: 14.0.24720.0, time stamp: 0x564ea97e
Faulting module name: KERNELBASE.dll, version: 6.1.7601.19045, time stamp: 0x56258f05
Exception code: 0xe0434352
Fault offset: 0x0000c42d
Faulting process id: 0xb64
Faulting application start time: 0x01d131c68bdc0db0
Faulting application path: c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: cb600c61-9db9-11e5-abfc-005056c00008
和
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
at System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
at System.Windows.Forms.Control.BeginInvoke(System.Delegate, System.Object[])
at System.Windows.Forms.WindowsFormsSynchronizationContext.Post(System.Threading.SendOrPostCallback, System.Object)
at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.PostAction(System.Object)
at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(System.Threading.ContextCallback, System.Object, System.Threading.Tasks.Task ByRef)
at System.Threading.Tasks.AwaitTaskContinuation+<>c.<ThrowAsyncIfNecessary>b__18_0(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
的項目有VB和C#Windows窗體項目。 C++項目不會發生這種情況。
據我所知,組件總是正確構建,關閉visual studio時發生異常。我修改了我們的腳本來忽略這個特定的錯誤,但這似乎不是一個好的解決方案。
有人可以建議如何解決這個問題?
0xE0434352是託管異常的例外代碼,可以是任何東西。該堆棧跟蹤*非常*通用,可以是任何東西,但加載項始終位於列表的頂部。您應該使用msbuild.exe。 –
謝謝@HansPassant。有沒有一種方便的方法來使用MSBuild在給定的配置中構建一個Visual Studio項目? –
捕獲崩潰轉儲。運行** procdump -ma我C:\ localdumps **註冊procdump(https://technet.microsoft.com/en-us/sysinternals/dd996900.aspx)作爲死後調試器。當你遇到新的崩潰時,dmp被寫入C:\ localdumps。使用Windbg(Windows SDK中的調試工具的一部分:https://dev.windows.com/en-us/downloads/windows-10-sdk)打開此dmp並運行**!analyze -v **。也許這可以幫助你。 – magicandre1981