U
ultim
Hi!
I need to compile a piece of code from my application, so
i used the Microsoft.CSharp.Compiler class. However, at
the Compiler.Compile() Method i get the following
exception:
'System.Runtime.InteropServices.COMException' occurred in
cscompmgd.dll
Additional information: Cannot change thread mode after it
is set.
The code that produced this error is as follows:
string[] src = new string[1];
src[0] = str;
string[] nms = new string[1];
nms[0] = "clsRajzolo.cls";
string[] imps = new string[3];
imps[0] = "System.dll";
imps[1] = "System.Drawing.dll";
imps[2] = "System.Windows.Forms.dll";
Hashtable ht = new Hashtable();
ht.Add("target","library");
CompilerError[] ce = Compiler.Compile
(src,nms,"C:\testrajz.dll",imps,ht);
I need to compile a piece of code from my application, so
i used the Microsoft.CSharp.Compiler class. However, at
the Compiler.Compile() Method i get the following
exception:
'System.Runtime.InteropServices.COMException' occurred in
cscompmgd.dll
Additional information: Cannot change thread mode after it
is set.
The code that produced this error is as follows:
string[] src = new string[1];
src[0] = str;
string[] nms = new string[1];
nms[0] = "clsRajzolo.cls";
string[] imps = new string[3];
imps[0] = "System.dll";
imps[1] = "System.Drawing.dll";
imps[2] = "System.Windows.Forms.dll";
Hashtable ht = new Hashtable();
ht.Add("target","library");
CompilerError[] ce = Compiler.Compile
(src,nms,"C:\testrajz.dll",imps,ht);