static void _Main()
{
bool dll = false;
string source = Environment.ExpandEnvironmentVariables(@"%CSSCRIPT_DIR%\Samples\hello.cpp");
CompilerParameters options = new CompilerParameters(
new string[]
{
@"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll",
@"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll",
@"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll",
@"C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll"
},
Path.ChangeExtension(source, dll ? ".dll" : ".exe"),
false);
options.GenerateExecutable = !dll;
//options.CompilerOptions += "/target:winexe ";
options.IncludeDebugInformation = true;
CompilerResults result = new CPPCompiler().CompileAssemblyFromFileBatch(options, new string[]
{
source
});
}
}