CS-Script 3.27.0

Compile to executable     

/e - compiles script into console application executable 

cscs /e test
The command above compiles script test.cs into console application executable test.exe. Location of the executable is the same as location of the script file.


/ew - compiles script into Windows application executable 

cscs /ew test
The command above compiles script test.cs into Windows application executable test.exe. Location of the executable is the same as location of the script file.
 

Note:

During script excution the script engine helps CLR to locate all referenced assemblies, which are not in the 'current directory' or GAC. Such assemblies may come from the Default (%CSSCRIPT_DIR%\Lib) or Custom (SearchDirs) Script Library directory(s). If compiled script (*.exe) executed any assemblies from Script Library directories will not be found by CLR (because the execution is not conducted under the CS-Script environment). Thus in order to execute compiled script (*.exe) all referenced assemblies must be located either in GAC or to be in the same folder where the executable file is. 

See Also

Command-line interface