Integrating PartCover.NET with NAnt

Posted by davandries on Stack Overflow See other posts from Stack Overflow or by davandries
Published on 2009-07-30T23:52:14Z Indexed on 2010/04/21 16:13 UTC
Read the original article Hit count: 641

Filed under:
|

Hello,

I'm trying to integrate PartCover.NET with NAnt and CruiseControl.NET I can run PartCover.NET browser without problems, but it does not work once I try to run it in an NAnt task (in my CCNET build).

There must be an issue with my NAnt target but I can't find it. Maybe someone had experienced the same issues in the past?.

    <target name="CoverageUnitTest" description="Code coverage of unit tests">
	<exec program="${PartCover.exe}">
		<arg value="--target=${NUnit.console}" />
		<arg value="--target-work-dir=${project.dir}\bin\${configuration}"/>
		<arg value="--target-args=${project}.dll" />
		<arg value="--output=C:\partcover.xml" />
		<arg value="--include=[*]*" />
	</exec>
</target>

In CruiseControl, I got the following error message: [exec] Invalid option '--target C:\NUnit\bin\nunit-console.exe'

Build Error: NAnt.Core.BuildException
External Program Failed: C:\PartCover\PartCover.exe (return code was -1)
in C:\default.build line: 20 col: 4

   at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask()
   at NAnt.Core.Tasks.ExecTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()

thanks ! David

© Stack Overflow or respective owner

Related posts about cruisecontrol.net

Related posts about nant