CSharp.Scripting dynamic-compilation NotImplementedException on CSharpScript.EvaluateAsync

I want to try dynamic compilation in unity

  • Create a 2D project, 2022.3.1of1 LTS, cross platform
  • Install NuGetForUnity
  • Search for CSharp.Scripting and install Microsoft.CodeAnalysis.CSharp.Scripting

Here is my code:

using System.Collections;
using System.Collections.Generic;
using Microsoft.CodeAnalysis.CSharp.Scripting;
using UnityEngine;

public class Test : MonoBehaviour
{
    async void Start()
    {
        try
        {
            object result = await CSharpScript.EvaluateAsync("1 + 2");
            Debug.Log($"result: {result}");
        }
        catch (Exception e)
        {
            Debug.LogError(e);
        }
    }
}

and then i get this

System.NotImplementedException: The method or operation is not implemented.
  at Microsoft.CodeAnalysis.Scripting.Hosting.CoreAssemblyLoaderImpl.LoadFromStream (System.IO.Stream peStream, System.IO.Stream pdbStream) [0x00000] in <7da58dd2a6fc48459bcdbf30dedfadbc>:0 

I even tried to “debug” myself by searching source code on Github, probably stupid
Anyway, I really need help on this

I ended up made my own interpreter
I think this is a better solution