title: Dispose not called when running tests from a number of classes in VS
body: <p>I have a number of xUnit tests across multiple classes.  A lot of these classes rely on a setup method being called before each test and a clean up method being called after each test.</p>
  
  <p>In each test class I have a constructor which calls the setup method and a dispose method like the following to clean up:</p>
  
  <pre><code>public override void Dispose()
  {
      Cleanup();
  }
  </code></pre>
  
  <p>Each test class extends a base class, which extends a class which inherits <code>IDisposable</code>.</p>
  
  <p>When I run the tests in an individual test class all the tests run fine and the dispose method is called correctly.</p>
  
  <p>When I run all the tests in my solution using the test explorer in Visual Studio, a lot of the tests are failing because the clean up method isn't being called.  When I debug the tests I'm not seeing dispose being called.</p>
  
  <p>I installed the <code>xunit.runner.visualstudio</code> NuGet package to get the tests to run in Visual Studio 2019.  I'm using xUnit 2.4.1.</p>
  
  <p>Does anybody know why dispose is not being called when I run all the tests at once?</p>