views:

174

answers:

2

I am trying to integrate NCover 2 into TeamCity 5.0.1, and since I have some files in the project that are out of my control, I'd like to exclude those from the NCover statistics.

In the TeamCity build runner setup, I have an option for "Additional NCover arguments", and by looking at the page that describes NCover parameters, I added the following to this box:

//exclude-types "Markdown;Settings;Resources"

When running the teamcity buildstep, I get this error in my log, and the build fails:

NCover has determined that one of the paths in the
//h or //w commands ends with a backslash (\).
Please remove or escape the backslash and run NCover again.

If I remove this setting, the error goes away.

Has anyone configured TeamCity and NCover 2 like this and can spot my mistake?

A: 

the command you posted looks correct, check the rest of the teamcity build log to see the entire command that they're sending to ncover. It's possible that the base command they send + the command you've entered is triggering the error message.

Stephen Ward
I can't really find the full command line in the log, I wonder if there's some bigger logs on disk. I'll dig around my server tonight.
Lasse V. Karlsen
+1  A: 

We had a similar problem with attribute exclusion when we triggered NCover 1.5.8 from NAnt. It was an issue with proper quotation of the arguments. We simply couldn't get it working although the args exactly complied to the NCover documentation. A workaround solved the problem for us: Passing arguments via a settings file

The Chairman
Thanks, I hadn't thought of that, worked nicely!
Lasse V. Karlsen