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

  • SEARCH
  • Home
  • 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 9150053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:33:40+00:00 2026-06-17T11:33:40+00:00

Does NUnit support the concept of an Assembly Teardown similar to the Microsoft.VisualStudio.TestTools.UnitTesting.AssemblyCleanupAttribute that

  • 0

Does NUnit support the concept of an Assembly Teardown similar to the Microsoft.VisualStudio.TestTools.UnitTesting.AssemblyCleanupAttribute that can be applied to a static method?

This would be run after all the tests within the assembly have completed. I am currently using NUnit 2.6.0.

  • 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-06-17T11:33:41+00:00Added an answer on June 17, 2026 at 11:33 am

    It turns out this functionality does exist in NUnit it is just not very obvious or intuitive.

    According to Charlie Poole in the feature request I made for this functionality here, he states the following will work, which is a direct quote from him.

    Decorate a class outside of any namespace with [SetUpFixture].
    Decorate a method of that class with [TearDown]. If you like, decorate
    another with [SetUp].

    Differences from what you are asking for:

    1. The name makes it a little unobvious in this usage.

    2. NUnit allows any number of these and calls them all, without any guarantee of ordering. This is by design.

    3. It can be applied to a static or instance method. If it’s an instance method, the class must have a default constructor and it will
      be created with a lifespan of the entire test run. This is also by
      design.

    Now this is not pretty but it should achieve the same functionality, and maybe he will make it a little cleaner in 3.0. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does MSTest have standalone GUI similar to nUnit that lets me use it and
I want to create NUnit test to ensure that my function does not throw
Does anyone have any suggestions for a good tool, xslt or other that can
I've a project in .NET Framework 3.5 and as i can see nUNIT does
For unit testing purposes: Im searching for testing framework like NUnit that can validate
Does NUnit support (perhaps by using a third party libraries) a smart comparison for
Does anyone know if it's possible to use MSpec with MBUnit instead of NUnit?
By default nunit tests run alphabetically. Does anyone know of any way to set
We got a problem with NUnit 2.5.3: nunit-console.exe does not return after finishing all
Does anyone know of a free tool, similar to what is built into Visual

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.