I've had TeamCity running for a long time, with no problems.

I then upgraded to TeamCity 8, and now all my .Net projects fail when launching the Test build step.

The only error message I see is this: MSBuild runner exits with not zero code

The test part of my log, looks like this:

[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

If I look at the teamcity-build.log file, I can see it says err on the line where the NUitLauncher is executed:

[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

Anyone else seen this? Is there a place to find more extensive log information?

有帮助吗?

解决方案

This was a dotCover related issue.

I fixed it by installing the latest version of dotCover from here: http://www.jetbrains.com/dotcover/

Then, in each build configuration that defines the MSTest build step and uses dotCover, you need to override the dotCover home directory with the one where you just installed dotCover.

其他提示

I encountered the same issue and I fixed it by following this article. However, I assigned the permission to the TeamCity installation folder (C:\TeamCity in my case) instead of the Program Files (x86) folder. Seems that dotCover bundled with TeamCity is installed there instead of the program files folder.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top