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 6558515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:12:33+00:00 2026-05-25T13:12:33+00:00

i was using this nant task for my nunit tests. <nunit2 failonerror=false> <formatter usefile=true

  • 0

i was using this nant task for my nunit tests.

<nunit2 failonerror="false">
  <formatter usefile="true"
             outputdir="build"
             type="Xml"
             extension=".xml"/>
  <test>
    <assemblies>
      <include name="Build/*.Tests.dll"/>
    </assemblies>
    <references >
      <include name="Tools/**/*.dll"/>
      <include name="Build/*.dll"/>
    </references>
  </test>
</nunit2>

It had the nice benefit that I could use it in multiple projects without changing anything. The problem is that it seems to be ignoring the TestCase and ExpectectException attributes on some of my tests causing them to fail. I’ve seen the suggestion to use the exec task to call nunit-console.exe, but then I have to specify all of the test dll’s individually. Which means I can no longer use it in all of my projects without having to edit it. I’d all so have to edit it any time I add a test project to one of my solutions.

Is there any way to get the best of both worlds?

  • 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-25T13:12:34+00:00Added an answer on May 25, 2026 at 1:12 pm

    You can use <foreach> to run your tests:

    <foreach item="File" property="test-assembly">
      <in>
        <items>
          <include name="${binaries-dir}/*" />
        </items>
      </in>
      <do>
        <exec program="${nunit.exe}" workingdir="${binaries-dir}"
            managed="true">
          <arg value="/nologo" />
          <arg value="${test-assembly}" />
        </exec>
      </do>
    </foreach>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create an installer for my project using NAnt. this is
Hi I am using Xpath in my Nant build script to change some config
HI, We are using NANT build scripts in our project. The scenario is as
I'm using NAnt 0.85 as a build script. Part of the script is to
I am using NAnt to build 5 different installer packages for the same software,
I'm using CruiseControl.NET with NUnit and NAnt. I'm trying to get CC.net to send
I am using the asminfo task in NAnt but would like to be able
I am putting an XSL together than will create a NAnt build script using
Using this question as the base is there an alogrithm or coding example to
Using this file as source, I have a situation where I need to retrieve

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.