Hi,
We have now upgraded to NCover 2.0.3, and here is how we run unit tests in our build script:
<typemockstart link="NCover2.0" />
<ncover
program="${ncover.path}"
profiledProcessModule="VsTestHost.exe"
commandLineExe="${mstest.path}"
commandLineArgs="/testcontainer:${mstest.library.path} /runconfig:${mstest.project.path} /resultsfile:${output.dir}mstest.log"
coverageFile="${output.dir}
cover.log"
logFile="${output.dir}coverage.log"
failonerror="true">
<assemblies basedir=".">
<include name="**/${application.base.namespace}*.dll" />
<exclude name="**/${application.base.namespace}*Tests.dll" />
</assemblies>
</ncover>
<typemockstop />
The problem is still the same, that is we are getting a "TypeMock not enabled" exception in all tests that use TypeMock. Code coverage, however, is produced correctly.
I have tried to run the tests without NCover, and they run fine. I also tried to run them with NCover but without explicitly enabling TypeMock in the script (with the NAnt task) and I still get the same error. Note that TypeMock is linked with 'NCover2.0' from the configuration tool.
What are we doing wrong here?
Thanks in advance,
/Enrico