06-20-2023, 10:34 PM
The following example code cannot be executed
![[Image: a.gif]](https://i.ibb.co/476y4PZ/a.gif)
![[Image: a.gif]](https://i.ibb.co/476y4PZ/a.gif)
/*/ nuget Roslyn\Microsoft.CodeAnalysis.CSharp; /*/
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis;
using System.Runtime.Loader;
using System.Reflection;
string code = """
using System;
using Au;
foreach (var v in args) print.it(v);
dialog.show("test");
""";
var c = CsScript.Compile(code);
if (c == null) return;
//print.redirectConsoleOutput = true; //need this if the script contains Console.WriteLine and the caller app isn't console
c.Run("command", "line", "arguments");