Teamcity 5.0 and NCover on x64

hi - having a bit of trouble getting teamcity 5.0 and NCover-x64-3.3.2.6211 working

ncover is installed and working on the environment and I have a project set up which builds fine as long as I don't set the NCover settings.

when I do set the NCover settings the build fails with :

[10:27:06]: Project "TEST1.sln.teamcity.patch.tcprojx" (Build_TeamCity_generated_0e5c5dc23c024386aa265257be44013c;NUnit_TeamCity_generated_0e5c5dc23c024386aa265257be44013c target(s)): (38s)
[10:27:45]: [Project "TEST1.sln.teamcity.patch.tcprojx" (Build_TeamCity_generated_0e5c5dc23c024386aa265257be44013c;NUnit_TeamCity_generated_0e5c5dc23c024386aa265257be44013c target(s)):] C:\TeamCity\projects\TEST1\TEST1.sln.teamcity.patch.tcprojx(10, 5): c:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\TeamCity\buildAgent\temp\buildTmp\tmp15DB.tmp exited with code 20000.


when I run "c:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\TeamCity\buildAgent\temp\buildTmp\tmp15DB.tmp" from the command line it seems to run fine without error.


The settings I'm using for NCover are:

NET Coverage tool: NCover 3
Path to NCover 3: * : C:\Program Files\NCover
Run NCover under: x64

no additional NCover Arguments or NCover Reporting Arguments

thanks for you help!
warren

6 comments
Comment actions Permalink

Please check you have selected x64 for NUnit tests too.

0
Comment actions Permalink

thanks for that - that did work, but now I have a strange error in my build log and no "coverage" tab ( i do have "artifacts" however)

[14:25:03]: Generate HTML report

[14:25:04]: [Generate HTML report] Error: -------------------------------------------------------------------------------
---- Top level exception: System.Exception
An error occurred while loading your coverage file: Could not find a part of the path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\sisaqkig.tmp'.
at NCover.Framework.Reports.ReportingProcessor.CreateCoverageView(List`1 filenames, ICoverageReportSettings sett)
at NCover.Framework.Reports.ReportingProcessor.Process()
at NCover.Reporting.ReportMain.RunReport(String[] args, IOutputWriter output)

---- Inner exception: System.IO.DirectoryNotFoundException
Could not find a part of the path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\sisaqkig.tmp'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

...

[14:25:04]: [Generate HTML report] NCover.Reporting tool exited with code: 2
[14:25:04]: [Generate HTML report] NCover.Reporting tool returned non-zero exit code.
[14:25:04]: Generate Coverage statistic values

[14:25:05]: [Generate Coverage statistic values] Error: -------------------------------------------------------------------------------
---- Top level exception: System.Exception
An error occurred while loading your coverage file: Could not find a part of the path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\18gr98k0.tmp'.
at NCover.Framework.Reports.ReportingProcessor.CreateCoverageView(List`1 filenames, ICoverageReportSettings sett)
at NCover.Framework.Reports.ReportingProcessor.Process()
at NCover.Reporting.ReportMain.RunReport(String[] args, IOutputWriter output)

---- Inner exception: System.IO.DirectoryNotFoundException
Could not find a part of the path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\18gr98k0.tmp'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

...


any idea why it might be looking C:\Windows\system32\config\systemprofile\AppData\Local\Temp\ for temp files?

thanks,
warren

0
Comment actions Permalink

Please try putting '//or FullCoverageReport:Html:{teamcity.report.path}' to NCover Reporting Arguments: field.
What was the original value?

Thanks!

0
Comment actions Permalink

hi - tried that but still getting the same error. the NCover Reporting Arguments: field was empty intially.

thanks,
warren

0
Comment actions Permalink

hi - figured out what it was - was running teamcity under SYSTEM account.
if you run it on a named account Ncover will work fine.

thanks for your help!

warren

0
Comment actions Permalink

Hi warren,

Your problem occurs because the temporary file path used when NCover.Reporting loads a coverage file does not exist for the Local System account. You should make sure the path exists, and then you will be able to generate reports. The reason this issue occurs is because the Local System does not usually need to create temporary files in this manner.

We have a KB document with instructions here: http://docs.ncover.com/kb/errors-when-using-ncover-reporting-under-the-local-system-account/

(In short, make sure the path in the error you received "C:\Windows\system32\config\systemprofile\AppData\Local\Temp" exists. You probably will only need to create the "Temp" folder inside the "Local" directory, then you will be able to run TeamCity as Local System and still get your coverage reports.)

Thanks for using NCover!

John Timms
NCover Support Team

0

Please sign in to leave a comment.