Closed caesarm closed 1 year ago
In CLI interface the alternative compiler is still supported but for the hosted execution (your case) only CodeDom and Roslyn engines are supported currently.
Saying that you can specify your custom compiler but I do not know if it will work straight away:
CodeDomEvaluator.CompileOnServer = false;
Globals.csc = @"your vbc.exe file";
I did find one issue. A small change is needed in the CodeDomeEvaluator class. The -define argument for vbc.exe takes a comma delimited list of constants and errors with a semicolon as the delimiter. I downloaded the source for 4.7.1.0 and tested the changes below.
Changed line 226 to this
common_args.Add("-define:TRACE,NETCORE,CS_SCRIPT");
Maybe an easier fix for both cases is to add a define argument for each constant.
common_args.Add("-define:TRACE");
common_args.Add("-define:NETCORE");
common_args.Add("-define:CS_SCRIPT");
Agree. Done. The change will be available in the very next release. Thank you for investigating it.
I was trying to migrate from CS-Script.bin 3.30 package to CS-Script 4.6.5 version and cannot find a way to use the CSSCodeProvider to specify VB for the script. The UseAlternativeCompiler settings seems to be removed from the GlobalSettings.
Is this still supported?