<ncover>

NAnt task for automating NCover.Console.exe, with both NCover 1.3.3 and 1.5.x support. Note that this task will self register CoverLib.dll by default using the registry (does not require local admin).

Parameters

Attribute Type Description Required
assemblyList string Used to specify the assemblies to be profiled by specifically naming them. Values should be separated by semi-colons and not include suffixe or path (and case sensitive) as this is how they are identified by the CLR. e.g. "MyApp.Main;MyApp.Core". False
commandLineArgs string The arguments to pass to the command line executable to be launched by NCover (such as nunit-console.exe). False
commandLineExe string The command line executable to be launched by NCover (such as nunit-console.exe). False
coverageFile string The filename for the output coverage.xml file (default). False
excludeAttributes string If coverage exclusion attributes have been applied (NCover 1.5.4 onwards) specify the full namespace to the attribute including the "Attribute" suffix - e.g. "CoverageExcludeAttribute" if defined in no namespace. Separate multiple attributes with semi-colons. False
logFile string Gets or sets the logfile name to write to if logLevel is set to anything other than "Quiet". The default is "coverage.log". False
logLevel NCoverLogLevel What level of NCover logging to provide. Values are "Quiet", "Normal" (default) and "Verbose". Note that due to a current bug in NCover 1.5.4 there is no different between Quiet and Normal since the //q argument (NoLog=true) will lock NCover. So logging is always on for NCover 1.5.4 False
profiledProcessModule string Gets or sets the profiled process module name. Use this argument when the executable being launched is not the actual process you want to profile coverage for. False
profileIIS bool Determines whether to profile under IIS (//iis). Default value is false. False
profileService string The service name to profile if any (//svc). Default is none. False
program string The name of the executable that should be used to launch the external program. False
registerProfiler bool Determines whether to register NCover CoverLib.dll on each run. The default is true. You would set this to false if using TypeMock due to a conflict in registered profilers. If set to true, the NCover task uses a reference counting approach to minimise the chance of issues when simultaneous builds. False
workingDirectory string Gets or sets the working directory for the command line executable. False
xmlFormat NCoverXmlFormat Gets or sets a value indicating the xml output format to write (new in NCover 1.5.7). Default value is "Xml1", alternate option is "Xml2" which nests method nodes within class nodes. Note however that "Xml2" is for future use and is not yet supported by NCoverExplorer as of version 1.3.6. False
failonerror bool Determines if task failure stops the build, or is just reported. The default is true. False
if bool If true then the task will be executed; otherwise, skipped. The default is true. False
timeout int The maximum amount of time the application is allowed to execute, expressed in milliseconds. Defaults to no time-out. False
unless bool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbose bool Determines whether the task should report detailed build log messages. The default is false. False

Framework-configurable parameters

Attribute Type Description Required
useruntimeengine bool Specifies whether the external program should be executed using a runtime engine, if configured. The default is false. False

Nested Elements:

<assemblies>

Used to specify the assemblies to be profiled by choosing dynamically from a directory. To use see <fileset>.

</assemblies>

<arg>

The command-line arguments for the external program.

Represents a command-line argument.

Parameters

AttributeTypeDescriptionRequired
dirdirectory The value for a directory-based command-line argument; will be replaced with the absolute path of the directory. False
filefile The name of a file as a single command-line argument; will be replaced with the absolute filename of the file. False
ifbool Indicates if the argument should be passed to the external program. If true then the argument will be passed; otherwise, skipped. The default is true. False
linestring List of command-line arguments; will be passed to the executable as is. False
path<path> The value for a PATH-like command-line argument; you can use : or ; as path separators and NAnt will convert it to the platform's local conventions, while resolving references to environment variables. False
unlessbool Indicates if the argument should not be passed to the external program. If false then the argument will be passed; otherwise, skipped. The default is false. False
valuestring A single command-line argument; can contain space characters. False

Nested Elements:

<path>

Sets a single command-line argument and treats it like a PATH - ensures the right separator for the local platform is used.

</path>

Examples

</arg>

Examples

Requirements

Assembly: NCoverExplorer.NAntTasks (1.3.6.15)