ncoverProfile problem. MSTest failing with Invalid switch "c".

604 views
Skip to first unread message

Jeremy

unread,
Jun 8, 2010, 12:36:14 PM6/8/10
to ccnet-user
My ncoverProfile block is causing MSTest to throw this error:

Invalid switch "c".
For switch syntax, type "MSTest /help"

Which causes NCover to throw this exception:

---- Top level exception: System.Exception
No data was collected.
at NCover.Framework.ProfilerDriver._GetCoverageData()
at NCover.Framework.ProfilerDriver.ExecuteNCover(Int32&
profiledAppCode)
at NCover.Framework.ProfilerDriver.Execute(Int32&
profiledAppCode)
at NCover.ConsoleMain.ConsoleMain.RunCoverage(String[]
args, IOutputWriter output)

From what I can tell, my ncoverProfile block is correct, but perhaps
not. Here is my ncoverProfile block:

<ncoverProfile>
<executable>C:\PROGRA~1\NCover\NCover.Console.exe</
executable>
<program>C:\PROGRA~1\MICROS~1.0\Common7\IDE\MSTest.exe</
program>
<testProject>MyProject.Tests.dll</testProject>
<baseDir>C:\Projects\MyProject\bin</baseDir>
<includedAssemblies>MyProject</includedAssemblies>
</ncoverProfile>

Does anyone have an idea of what is wrong? It seems that CCNET is
messing up when it converts the ncoverProfile information into
commands for the command line. Please look into and fix if
necessary. This is preventing me from getting work done and delaying
the deployment of my team's CCNET server.

Thanks,
Jeremy

Daniel Nauck

unread,
Jun 8, 2010, 12:45:52 PM6/8/10
to ccnet...@googlegroups.com
Hello,

please open a new JIRA [1] issue and attach some mor information:

- in the ccnetservice.log file the part of the execution of ncover
profile (it contains the whole cmd line + params)
- how ncover.profile.exe should be called (if the ccnet cmd line + parms
are wrong
- what version of ncover you're using

Thanks

Daniel

[1] http://jira.public.thoughtworks.org/browse/CCNET

BenRice23

unread,
Oct 31, 2011, 12:41:22 PM10/31/11
to ccnet...@googlegroups.com
I ran into the same issue and in case anyone else runs across this I found that the <testProject> dll value needs to be preceeded with the /testcontainer: switch. In Jeremy's case the corrected node would be <testProject>/testcontainer:MyProject.Tests.dll</testProject>.
Reply all
Reply to author
Forward
0 new messages