title: Nant <csc> build exe System.TypeInitializationException
body: <p>I successfully build several projects using <code>&lt; csc target="exe"&gt;</code>.  However, when I try to run the generated exe, I get:</p>
  
  <pre><code>Unhandled Exception: System.TypeInitializationException: The type initializer for 'Quartz.Impl.StdSchedulerFactory' threw an exception. ---&gt; System.IO.FileNotFoundException: Could not load file or assembly 'Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e' or one of its dependencies. The system cannot find the file specified.
  File name: 'Common.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=af0
  8829b84f0328e'
     at Quartz.Impl.StdSchedulerFactory..cctor()
  </code></pre>
  
  <p>It appears that Nant references the dll's while building but does not copy the dependencies into the outputdir resulting in the above runtime exception.  Is there a way to instruct NAnt to copy dependencies automatically?  It's tedious to have to run the exe multiple times to figure out what dependencies are needed and &lt; copy> them into the outputdir one by one. </p>