Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3631246
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:22:22+00:00 2026-05-19T00:22:22+00:00

This is my first time setting up teamcity and I am running into some

  • 0

This is my first time setting up teamcity and I am running into some issues displaying results. I want to have a build step that runs an NAnt script. The script should run my unit tests through PartCover and display results. The results should be:

  • Tests that pass/Tests that fail
  • Coverage report

But I don’t really know how to set up the script or the settings or even where I should view these results (the artifacts section I’m guessing?). Using the following script below, everything runs ok but I am not able to view any reports.

<project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 

<loadtasks assembly="C:\Program Files\Gallio\bin\Gallio.NAntTasks.dll" />

<target name="test"> 
  <gallio result-property="exitCode" failonerror="false" > 
    <runner-extension value="TeamCityExtension,Gallio.TeamCityIntegration" /> 
    <files> 
      <include name="%system.teamcity.build.checkoutDir%\Trunk\MyLibrary.Testing\bin\Release\MyLibrary.Testing.dll"/> 
    </files> 
  </gallio> 
  <fail if="${exitCode != '0'}" >One or more tests failed. Please check the log for more details</fail>    
</target>

</project>

For the .Net Coverage section, I have PartCover (2.2 or 2.3) selected but I don’t have anything in the PartCover Arguments (should I?)

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:22:23+00:00Added an answer on May 19, 2026 at 12:22 am

    I ran into issues with NAnt and decided to just use MSBuild. MSBuild was easier to work with and gave very descriptive error messages. (I also found our license for NCover so used that as well). Here is my script for anyone interested. I found the code for it from various spots on the net.

    <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    
      <PropertyGroup>
        <CoverageDir>.\Tests\Output\Coverage</CoverageDir>
        <CoverageFilesDir>.\Tests\Output\Coverage\files</CoverageFilesDir>
        <BinDir>Testing\bin\x86\Release</BinDir>
        <NCoverDir>C:\Program Files (x86)\NCover</NCoverDir>
        <GallioDir>C:\Program Files (x86)\Gallio\bin</GallioDir>
      </PropertyGroup>
    
      <UsingTask TaskName="NCover" AssemblyFile="$(NCoverDir)\Build Task Plugins\NCover.MSBuildTasks.dll" /> 
      <UsingTask TaskName="NCoverExplorer" AssemblyFile="$(NCoverDir)\Build Task Plugins\NCoverExplorer.MSBuildTasks.dll"/>
    
      <!-- Specify the tests assemblies --> 
      <ItemGroup> 
        <TestAssemblies Include="$(BinDir)\library.Testing.dll" />
        <CoverageAssemblies Include="$(BinDir)\library.dll" />
      </ItemGroup>
    
        <Target Name="Coverage">
          <Message Text="Creating $(CoverageFilesDir)" />
          <MakeDir Directories="$(CoverageFilesDir)"/>
    
          <Message Text="##-------------------- Running Coverage Reports --------------------##" /> 
          <Message Text="Coverage Assemblies @(TestAssemblies)" />
    
          <!--Run NCover to gather coverage information-->
          <NCover
          ToolPath="$(NCoverDir)"
          TestRunnerExe="$(GallioDir)\Gallio.Echo.exe"
          TestRunnerArgs="%(TestAssemblies.FullPath)"
          IncludeAssemblies="@(CoverageAssemblies)"
          LogFile="$(CoverageFilesDir)\%(TestAssemblies.Filename)-ncover.log"
          RegisterProfiler="false"
          CoverageFile="$(CoverageFilesDir)\%(TestAssemblies.Filename)-coverage.xml"/>    
    
          <CreateItem Include="$(CoverageFilesDir)\*-coverage.xml">
            <Output TaskParameter="Include" ItemName="CoverageReports"/>
          </CreateItem>
    
          <!--Generate coverage report-->
          <NCoverExplorer
            ToolPath="$(NCoverDir)"
            ProjectName="Library Coverage"
            ReportType="4"
            Sort="CoveragePercentageAscending"
            Filter="None"
            OutputDir="$(CoverageDir)"
            XmlReportName="CoverageReport.xml"
            HtmlReportName="CoverageReport.html"
            ShowExcluded="True"
            SatisfactoryCoverage="15"
            FailMinimum="False"
            CoverageFiles="@(CoverageReports)"/>
    
          <!-- In case one of the tests fails, make sure to stop TypeMock and unregister NCover. -->
          <OnError ExecuteTargets="test-finally"/>
      </Target>
    
      <!-- Stopping unregistering NCover is a separate target because it has to happen -->
      <!-- regardless of success or failure of the unit tests. Like the "finally" in a "try/finally" block. -->
      <Target Name="test-finally">
        <Exec Command="regsvr32 /u /s &quot;$(NCoverDir)\CoverLib.dll&quot;" ContinueOnError="true"/>
      </Target>
    
    </Project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the first time that I have attempted to add some localization into
I am doing this first time so I need some help. I am using
This is my first time with Web services. I have to develop web services
this is my first time posting here, I have a question which I have
Setting up TeamCity 5.0.1 to run unit tests for the first time, we're seeing
This is my first time setting up Hudson and I would like to do
I'm having some issues setting up django-mssql on Win Server 2008 R2. I have
This is my first time using a typedef enum and I need some help
This is my first time using points and I seem to run into an
This is the very first time I have set up a git server, as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.