There is no built-in support for saving to generated code to a DLL, sorry.
There is support for building a Assembly using Reflection.Emit, however. Changes required to save a DLL include the following:
- Set ScriptEngine.EnableDebugging to true. This enables the Reflection.Emit code path.
- Change the second parameter of DefineDynamicAssembly to AssemblyBuilderAccess.RunAndSave and add another parameter (the directory to save to) [MethodGenerator.cs line 233]
- Call reflectionEmitInfo.AssemblyBuilder.Save(fileName) after the code has been generated [MethodGenerator.cs line 284]
Note that if you do this the DLL will have a hard dependency on Jurassic.dll (i.e. Jurassic.dll must be in the same directory for it to work).