<p>Is there any chance to get this work? I want my tests to be run by nunit2 task in NAnt. In addition I want to run NCover without running tests again. </p>

[{'answer_id': 44037, 'author': 'Greg Hurlman', 'author_id': 35, 'author_profile': 'https://Stackoverflow.com/users/35', 'pm_score': 2, 'selected': False, 'text': "<p>Why not have NCover run NUnit?  You get the exact same test results. Also, what exactly are you trying to measure when running NCover outside of the tests?  There's other ways to find stale or unreferenced code.</p>\n"}, {'answer_id': 189261, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>I am having to do the same thing. I think the best we can hope for is to break open the NUnit jar file that comes with TeamCity and writing a custom task that integrates NUnit2 and NCover. I wish this wasn't so, but the NUnit2 task does not produce any visible output, so TeamCity is obviously not reading StdOut for the test results.</p>\n"}, {'answer_id': 190097, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': True, 'text': '<p>I figured it out. You change the path of the NUnit launcher to that of TeamCity\'s own. Here is an example:</p>\n\n<pre><code>    &lt;mkdir dir="${build}/coverage" failonerror="false"/&gt;\n\n    &lt;!-- run the unit tests and generate code coverage --&gt;\n    &lt;property name="tools.dir.tmp" value="${tools.dir}"/&gt;\n    &lt;if test="${not path::is-path-rooted(tools.dir)}"&gt;\n        &lt;property name="tools.dir.tmp" value="../../${tools.dir}"/&gt;\n    &lt;/if&gt;\n\n    &lt;property name="nunitpath" value="${lib.dir}/${lib.nunit.basedir}/bin/nunit-console.exe"/&gt;\n    &lt;property name="nunitargs" value=""/&gt;\n    &lt;if test="${property::exists(\'teamcity.dotnet.nunitlauncher\')}"&gt;\n        &lt;property name="nunitpath" value="${teamcity.dotnet.nunitlauncher}"/&gt;\n        &lt;property name="nunitargs" value="v2.0 x86 NUnit-2.4.8"/&gt;\n    &lt;/if&gt;\n\n    &lt;ncover program="${tools.dir.tmp}/${tools.ncover.basedir}/ncover.console.exe"\n       commandLineExe="${nunitpath}"\n       commandLineArgs="${nunitargs} ${proj.name.unix}.dll"\n       workingDirectory="${build}"\n       assemblyList="${proj.srcproj.name.unix}"\n       logFile="${build}/coverage/coverage.log"\n       excludeAttributes="System.CodeDom.Compiler.GeneratedCodeAttribute"\n       typeExclusionPatterns=".*?\\{.*?\\}.*?"\n       methodExclusionPatterns="get_.*?; set_.*?"\n       coverageFile="${build}/coverage/coverage.xml"\n       coverageHtmlDirectory="${build}/coverage/html/"\n    /&gt;\n</code></pre>\n\n<p>As you can see, I have some of my own variables in there, but you should be able to figure out what is going on. The property you are concerned with is teamcity.dotnet.nunitlauncher. You can read more about it here at <a href="http://www.jetbrains.net/confluence/display/TCD4/TeamCity+NUnit+Test+Launcher" rel="nofollow noreferrer">http://www.jetbrains.net/confluence/display/TCD4/TeamCity+NUnit+Test+Launcher</a>. </p>\n'}]
['https://Stackoverflow.com/questions/44007', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3182/']