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
Hi guys,
Within my team build script (TFSBuild.proj), I am running NUnit tests via NCover using the exec task. I have called TMockStart task as follows:

   <Target>
      <TypeMockStart>
   </Target>


But I am seeing the following error in the build log:

c:TeamBuildBuildAmmadoAmmado.Web.NightlyBuildTypeTFSBuild.proj(150,3): error : Profiler: NCover is not recognized or not installed on your machine
    c:TeamBuildBuildAmmadoAmmado.Web.NightlyBuildTypeTFSBuild.proj(150,3): error : There are no recognized profilers


NCover is installed...

Funny thing is, on the build machine, if I use the TypeMock Configuration tool to "link" against NCover, then the build DOES work (without the "Link" and "ProfilerLaunchedFirst" attributes on TMockStart). BUT this "linking" seems to come undone after logging out of the build machine, and the nightly builds fail. (and hence the reason why I am looking into the Link option on TMockStart).

For what it's worth, within my build script, I am calling NCover like this from my CoreTest override:

<Exec>

________
Amc Matador History
asked by pmcevoy (4.7k points)

8 Answers

0 votes
Hi
Does the night build runs under different user than the one you are using when you logged on?
:arrow: An advice - If you are using Ncover version 1.5.4 do not use the //q switch in an auto build. This cause NCover to lock up on exit. As you can seehere
(This has no connection to your problem)
answered by ohad (35.4k points)
0 votes
Hi Ohad,
The Team Build service is running as "tfsservice", and I log into the build machine as the same user to diagnose issues.

I restarted the TeamBuild service just in case (to be sure that it could see that I had installed NCover). NCover install dir IS on the PATH of tfsservice

Here is a little more information as I find it:

TypeMock.Net Configuration tool:

- Link with profiler is lost if I log out and then log back in again
- Link with profiler is lost if the server "locks" the screen (screen saver timeout etc)

<TypeMockStart> task
- Will work on it own (with no attributes), if profiler is currently linked
- Will work with the ProfilerLaunchedFirst="true" attribute set, but only while profiler has been linked
- Will not work with the Link="NCover" attribute, regardless if the profiler has been linked or not

Hope this helps
Pete
________
Washington Marijuana Dispensaries
answered by pmcevoy (4.7k points)
0 votes
Hmm strange. :shock:
What version of Ncover do you use?
answered by ohad (35.4k points)
0 votes
Using NCover 1.5.5, with NUnit 2.0 2.2.8
________
Rc51
answered by pmcevoy (4.7k points)
0 votes
Make that: NCover 1.5.5 Beta
________
Ktm 200exc
answered by pmcevoy (4.7k points)
0 votes
Hi
Are you running the tests on 64 bit machine?
answered by ohad (35.4k points)
0 votes
Hi Ohad,
The build machine is not 64 bit. It is Windows server 2003 R2 Enterprise Edition, Service Pack 1.

Pete
________
LAMBORGHINI 350GTV
answered by pmcevoy (4.7k points)
0 votes
After a great interactive problem solving session with Ohad, we discovered that the problem was actually to do with the way I was referencing the TypeMock.msbuild.tasks file, and associated TypeMock.MSBuild.DLL.

You see, I had originally checked these file into VSTS _beside_ my TFSBuild.proj. I had done this several versions ago (3.5.0 or thereabouts) when the docs on how to setup for TeamBuild were a little sparse.

I then never updated the DLL or the tasks file as versions increased. Additionally, I believe that TypeMock needs access to a config.xml file within the typemock installation dir.

The upshot of it is, that the new help files describe how to setup typemock in a TeamBuild environment much better, and once I did that, all was clear.

I just like to reiterate my praise for this product and the support team behind it. Second to none.

As an aside, by successfully migrating to NUnit, NCover and Jetbrains TestRunner/Resharper, we have saved thousands of euros per developer-seat, as we no longer need to license VS2005 Team Test edition and the built in MSTest to get the type of testing and coverage metrics that we need. We would not have been able to make the migration, if TypeMock did not support these opensource tools.

Thanks guys!
________
NEW JERSEY DISPENSARIES
answered by pmcevoy (4.7k points)
...