chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
I'm trying to use TypeMock together with NCover

When I run simple NAnt script that starts typemock and runs ncover (from typemock documentation), the tests (including those dependent on TypeMock) are executed successfully , but then I get

[ncover] ***************** Exception *****************
[ncover] -- Top-level exception (System.Exception)
[ncover] No data was collected.
[ncover] -- Stack Trace
[ncover] at NCover.Framework.ProfilerDriver._GetCoverageData()
[ncover] at NCover.Framework.ProfilerDriver.Execute()
[ncover] at NCover.ConsoleMain.ConsoleMain.Main(String[] args)


c:TeamCityTools ant-0.86-beta1in,6):
External Program Failed: C:Program FilesNCover\NCover.Console.exe (return code was 20000)

What am I doing wrong?

NAnt script:

<?xml version="1.0"?>
<project name="prj" default="test">
<property name="nunit" value="c:Program FilesNUnit 2.4.7in unit-console.exe" />
<property name="ncover.dir" value="C:Program FilesNCover" />
<property name="typemock.dir" value="c:Program FilesTypemockIsolator.2" />

<target name="test">
<loadtasks assembly="${typemock.dir}TypeMock.NAntBuild.dll" />
<loadtasks assembly="${ncover.dir}Build Task PluginsNCoverExplorer.NAntTasks.dll" />
<typemockstart target="2.0" link="NCover2.0" profilerlaunchedfirst="true" />
<ncover program="${ncover.dir}NCover.Console.exe"
<typemockstop />
</project >
asked by knst (2.9k points)

1 Answer

0 votes
To follow up on this issue (it was discussed in a duplicate forum thread) - this was an issue with Typemock Isolator 5.2.0 and 5.2.1, and fixed with 5.2.2. Update your Isolator version to the latest one and that should work.

Typemock Support
answered by doron (17.2k points)