2013-06-29 59 views
3

我已經有TeamCity運行了很長時間,沒有問題。TeamCity - MSBuild轉輪退出並非零代碼

然後我升級到TeamCity 8,現在所有的.Net項目在啓動測試構建步驟時失敗。

唯一的錯誤消息我看到的是這樣的:MSBuild runner exits with not zero code

我日誌的測試部分,看起來是這樣的:

[10:39:08][Step 1/2] Process exited with code 0 
[10:39:08]Step 2/2: Test (MSTest) (20s) 
[10:39:08][Step 2/2] Starting: F:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit 
[10:39:08][Step 2/2] in directory: F:\TeamCity\buildAgent\work\382c54c35fd97a3e 
[10:39:13][Step 2/2] JetBrains dotCover Console Runner v2.2.515.44. Copyright (c) 2009-2013 JetBrains s.r.o. All rights reserved. 
[10:39:13][Step 2/2] 
[10:39:28][Step 2/2] [JetBrains dotCover] Coverage session started [6/29/2013 10:39:28 AM] 
[10:39:28][Step 2/2] [JetBrains dotCover] Coverage session finished with errors: Can't initialize profiler. 
[10:39:28][Step 2/2] 
[10:39:28][Step 2/2] Product installation directory has no read access rights for WinRT applications.. 
[10:39:28][Step 2/2] ##teamcity[importData type='dotNetCoverage' tool='dotcover' file='F:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover79745141367270310401.data'] 
[10:39:29][Step 2/2] Importing data from 'F:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover79745141367270310401.data' (not existing file) with 'dotNetCoverage' processor 
[10:39:29][Step 2/2] Rejected coverage report file: F:\TeamCity\buildAgent\temp\buildTmp\coverage_dotcover79745141367270310401.data size: 0. File is empty or does not exist 
[10:39:29][Step 2/2] Process exited with code -2 
[10:39:29][Step 2/2] Step Test (MSTest) failed 
[10:39:29]Waiting for 1 service processes to complete 
[10:39:29]Publishing internal artifacts 
[10:39:29][Publishing internal artifacts] Sending build.finish.properties.gz file 
[10:39:29]Build finished 

如果我看teamcity-build.log文件,我可以看到它說犯錯在執行NUitLauncher的線上:

[2013-06-29 10:39:08,134] out - 
[2013-06-29 10:39:08,134] out -  14 Warning(s) 
[2013-06-29 10:39:08,134] out -  0 Error(s) 
[2013-06-29 10:39:08,134] out - 
[2013-06-29 10:39:08,134] out - Time Elapsed 00:00:19.87 
[2013-06-29 10:39:08,485] out - Process exited with code 0 
[2013-06-29 10:39:08,736] out - ----------------------------------------- [ Backstage::Build and Test #62 (buildId = 874) ] ----------------------------------------- 
[2013-06-29 10:39:08,739] out - Starting: F:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit 
[2013-06-29 10:39:08,739] out - in directory: F:\TeamCity\buildAgent\work\382c54c35fd97a3e 
[2013-06-29 10:39:08,746] err - F:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit 
[2013-06-29 10:39:13,336] out - JetBrains dotCover Console Runner v2.2.515.44. Copyright (c) 2009-2013 JetBrains s.r.o. All rights reserved. 
[2013-06-29 10:39:13,336] out - JetBrains dotCover Console Runner v2.2.515.44. Copyright (c) 2009-2013 JetBrains s.r.o. All rights reserved. 
[2013-06-29 10:39:13,336] out - 
[2013-06-29 10:39:13,337] out - 
[2013-06-29 10:39:28,002] out - [JetBrains dotCover] Coverage session started [6/29/2013 10:39:28 AM] 
[2013-06-29 10:39:28,002] out - [JetBrains dotCover] Coverage session started [6/29/2013 10:39:28 AM] 
[2013-06-29 10:39:28,752] out - [JetBrains dotCover] Coverage session finished with errors: Can't initialize profiler. 
[2013-06-29 10:39:28,753] out - [JetBrains dotCover] Coverage session finished with errors: Can't initialize profiler. 
[2013-06-29 10:39:28,753] out - 
[2013-06-29 10:39:28,753] out - 
[2013-06-29 10:39:28,753] out - Product installation directory has no read access rights for WinRT applications.. 
[2013-06-29 10:39:28,753] out - Product installation directory has no read access rights for WinRT applications.. 
[2013-06-29 10:39:29,170] out - Process exited with code -2 

任何人看到這個?有沒有一個地方可以找到更多的日誌信息?

+0

我有一個非常類似的問題,並按照這裏的說明修復它:http://confluence.jetbrains.com/pages/viewpage.action?pageId=49448495 – jrummell

回答

4

這是一個dotCover相關的問題。

我固定它通過安裝在這裏的最新版本dotCover的:http://www.jetbrains.com/dotcover/

然後,在規定的MSTest的構建步驟,並使用dotCover每個版本的配置,你需要重寫dotCover主目錄與一個地方你剛剛安裝了dotCover。

+0

我遵循這裏描述的步驟:http:// devnet .jetbrains.com/thread/440995更新TC使用的dotCover.zip,因此「您需要覆蓋dotCover主目錄和剛剛安裝dotCover的那個目錄」是不必要的。 – giacomelli

2

我遇到了同樣的問題,我通過以下this文章修復了它。但是,我將權限分配給TeamCity安裝文件夾(在我的情況下爲C:\TeamCity),而不是Program Files (x86)文件夾。似乎將與TeamCity捆綁在一起的dotCover安裝在那裏,而不是程序文件文件夾。

+0

同樣在這裏,但對於構​​建代理的安裝文件夾(在我的情況下是C:\ BuildAgent) –

相關問題