CompilerResults.CompiledAssembly throws file not found

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code...

string js = ReadFile(path);
JScriptCodeProvider p = new JScriptCodeProvider();
CompilerParameters cp = new CompilerParameters();
cp.GenerateExecutable = false;
cp.GenerateInMemory = true;
cp.CompilerOptions = "/t:library";
CompilerResults r = p.CompileAssemblyFromSource(cp, js);
System.Reflection.Assembly a = r.CompiledAssembly; // File not found
exception

What am I doing wrong. The error happens no matter which javascript file I
load so I am pretty surte it is not a problem in the script.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top