I have a textbox called ssd.
I want it to compile the C# code in it to "Prgoram.exe" at the same location.
I tried this:
CSharpCodeProvider codeProvider = new CSharpCodeProvider();
ICodeCompiler icc = codeProvider.CreateCompiler();
System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters();
parameters.GenerateExecutable = true;
parameters.CompilerOptions = "/target:winexe";
parameters.OutputAssembly = "Program.exe";
parameters.GenerateInMemory = false;
CompilerResults results = codeProvider.CompileAssemblyFromSource(parameters, ssd.Text);
But it's not working. Can you solve it please?
Thanks in advance.