2017-07-05 67 views
1

錯誤(退出代碼-3),進程返回蛋糕執行

An error occurred when executing task 'test'. 
    Error: System.Exception: DotCover: Process returned an error (exit code -3). 
     at Submission#0.<.ctor>b__29(Exception exception) 
     at Cake.Core.DefaultExecutionStrategy.HandleErrors(Action`1 action, Exception exception) 
     at Cake.Core.CakeEngine.HandleErrors(IExecutionStrategy strategy, Action`1 errorHandler, Exception exception) 
     at Cake.Core.CakeEngine.ExecuteTask(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report) 
     at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, String target) 
     at Cake.Scripting.BuildScriptHost.RunTarget(String target) 
     at Submission#0.<.ctor>b__31() 
     at Cake.Core.ActionTask.Execute(ICakeContext context) 
     at Cake.Core.DefaultExecutionStrategy.Execute(CakeTask task, ICakeContext context) 
     at Cake.Core.CakeEngine.ExecuteTask(ICakeContext context, IExecutionStrategy strategy, Stopwatch stopWatch, CakeTask task, CakeReport report) 
     at Cake.Core.CakeEngine.RunTarget(ICakeContext context, IExecutionStrategy strategy, String target) 
     at Cake.Scripting.BuildScriptHost.RunTarget(String target) 
     at Submission#0..ctor(Session session, Object& submissionResult) 
     at Submission#0.<Factory>(Session session) 
     at Roslyn.Scripting.CommonScriptEngine.Execute[T](String code, String path, DiagnosticBag diagnostics, Session session, Boolean isInteractive) 
     at Roslyn.Scripting.Session.Execute(String code) 
     at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments) 
     at Cake.Commands.BuildCommand.Execute(CakeOptions options) 
     at Cake.CakeApplication.Run(CakeOptions options) 
     at Cake.Program.Main() 

我怎樣才能解決這個問題?

回答

0

Cake只是從底層工具返回退出代碼,在這裏是DotCover。如果您在診斷模式蛋糕:

How to enable diagnostic verbosity for Cake

你應該能夠抓住正在執行的確切DotCover命令,然後你可以在命令行手動運行它。在這一點上,輸出可能會再次爲-3。

我在說的是,這很可能是DotCover分析您的應用程序的問題,而不是Cake的問題。

2

返回碼-3來自dotcover.exe表示正在分析的應用程序中的退出代碼不等於0。 (簡單英語,你的單元測試失敗)。看到這link

要驗證測試是否失敗,請嘗試單獨運行沒有DotCover別名的單元測試。

即使您的測試失敗,請參閱error handling中的蛋糕