CompileAssemblyFromSource throw a NotImplementedException

Discussion about the open-source Phalanger [?] project.

CompileAssemblyFromSource throw a NotImplementedException

Postby danieledll@codeplex » July 26th, 2007, 9:57 am

Hi to all,

yesterday i was playing with phalanger to write a little compiler/loader to load php modules. At beginning i used CompileAssemblyFromSource method of a PHP.Core.CodeDom.PhpCodeProvider instance, but it was throwing NotImplementedException so i started to use CompileAssemblyFromFile and all works correctly.

Looking around for the forum i've seen that CompileAssemblyFromSource should work!

######CODE######
System.CodeDom.Compiler.CompilerParameters parameters = new System.CodeDom.Compiler.CompilerParameters();
parameters.IncludeDebugInformation = false;
parameters.WarningLevel = 3;
parameters.CompilerOptions = "/target:dll /encoding:UTF-8";
parameters.GenerateExecutable = false;
parameters.GenerateInMemory = true;
parameters.ReferencedAssemblies.Add(@"C:\Windows\assembly\GACMSIL\System.Windows.Forms\2.0.0.0_b77a5c561934e089\System.Windows.Forms.dll");

PHP.Core.CodeDom.PhpCodeProvider phpCodeProvider = new PHP.Core.CodeDom.PhpCodeProvider();
System.CodeDom.Compiler.CompilerResults results = phpCodeProvider.CompileAssemblyFromSource(parameters, new string[] { this.textBox1.Text }); // Exception thrown here!
######CODE######

Any idea?
danieledll@codeplex
 
Posts: 6
Joined: January 7th, 2012, 8:52 pm

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 27 guests

cron

User Control Panel

Login

Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 27 guests