1

So I have this simple generator just for test purposes:

        var provider = new CSharpCodeProvider();
        var options = new CompilerParameters
        {
            GenerateExecutable = false, 
            GenerateInMemory = true
        };
        
        string code = "using System;namespace Expression{public static class Expression{public static void Test() {var foo = 2}}}";
        
        var result = provider.CompileAssemblyFromSource(options, code);

But Whenever I run it gives me System.PlatformNotSupportedException: Operation is not supported on this platform.

Note I am targeting net5.0-windows (do not know if this is relevant to the error)

Ahmed Fawzy
  • 309
  • 2
  • 8

0 Answers0