Nant <csc> build exe System.TypeInitializationException

classic Classic list List threaded Threaded
1 message Options
Suz
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Nant <csc> build exe System.TypeInitializationException

Suz
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=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()

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.
Loading...