I successfully build several projects using <csc target="exe">. However, when I try to run the generated exe, I get:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Quartz.Impl.StdSchedulerFactory' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Common.Logging, Version=126.96.36.199, Culture=neutral, PublicKeyToken=af08829b84f0328e' or one of its dependencies. The system cannot find the file specified.
File name: 'Common.Logging, Version=188.8.131.52, Culture=neutral, PublicKeyToken=af0
It appears that Nant references the dll's while building but does not copy the dependencies into the outputdir resulting in the above 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 <copy> them into the outputdir one by one.