Roslyn Scripting API CSharpScript.RunAsync but as mentioned github issues, its not designed to be called continuously because it keep creating new assembly in memory and not unloaded, causes memory leak (https://github.com/dotnet/roslyn/issues/41722)