_outputOption=_app.Option("-o|--output <OUTPUT_DIR>","Directory in which to place outputs",CommandOptionType.SingleValue);
_intermediateOutputOption=_app.Option("-t|--temp-output <OUTPUT_DIR>","Directory in which to place temporary outputs",CommandOptionType.SingleValue);
_frameworkOption=_app.Option("-f|--framework <FRAMEWORK>","Compile a specific framework",CommandOptionType.MultipleValue);
_configurationOption=_app.Option("-c|--configuration <CONFIGURATION>","Configuration under which to build",CommandOptionType.SingleValue);
_noHostOption=_app.Option("--no-host","Set this to skip publishing a runtime host when building for CoreCLR",CommandOptionType.NoValue);
_projectArgument=_app.Argument("<PROJECT>","The project to compile, defaults to the current directory. Can be a path to a project.json or a project directory");
// Native Args
_nativeOption=_app.Option("-n|--native","Compiles source to native machine code.",CommandOptionType.NoValue);
_archOption=_app.Option("-a|--arch <ARCH>","The architecture for which to compile. x64 only currently supported.",CommandOptionType.SingleValue);
_ilcArgsOption=_app.Option("--ilcargs <ARGS>","Command line arguments to be passed directly to ILCompiler.",CommandOptionType.SingleValue);
_ilcPathOption=_app.Option("--ilcpath <PATH>","Path to the folder containing custom built ILCompiler.",CommandOptionType.SingleValue);
_ilcSdkPathOption=_app.Option("--ilcsdkpath <PATH>","Path to the folder containing ILCompiler application dependencies.",CommandOptionType.SingleValue);
_appDepSdkPathOption=_app.Option("--appdepsdkpath <PATH>","Path to the folder containing ILCompiler application dependencies.",CommandOptionType.SingleValue);
_cppModeOption=_app.Option("--cpp","Flag to do native compilation with C++ code generator.",CommandOptionType.NoValue);
_cppCompilerFlagsOption=_app.Option("--cppcompilerflags <flags>","Additional flags to be passed to the native compiler.",CommandOptionType.SingleValue);
}
publicintExecute(OnExecuteexecute,string[]args)
{
_app.OnExecute(()=>
{
// Locate the project and get the name and full path