title: Running code on assembly load in xUnit
body: <p>I am using the <a href="http://effort.codeplex.com/" rel="nofollow noreferrer">Effort</a> library as a mock database, and it has some initialization code that has to run on assembly load.</p>
  
  <p>I have tried adding this initialization code in a static constructor that is referenced from every test via a base class constructor but this did not meet the requirements of the library.</p>
  
  <p>An answer to a similar question <a href="https://stackoverflow.com/questions/23033505/unit-testing-with-effort-and-sql-ce-in-parallel-fails">here</a> mentions an <code>AssemblyInitialize</code> attribute, but this is not applicable to xUnit - xUnit has no way of running code on assembly load.</p>
  
  <p>I also asked on the <a href="https://github.com/xunit/xunit/issues/431" rel="nofollow noreferrer">xUnit GitHub pages</a> - there is definitively no assembly level initializer.</p>
  
  <p>How can I run the initialization code that I need to in xUnit?</p>