specifying lib option for Compiler.Compile

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

Guest

Hi,

Inside my program, I'm trying to call Microsoft.CSharp.Compiler.Compile to
compile another c# program. I'm having a hard time figuring out what the
syntax is to pass as the lib option. I need to specify 2 directory
locations for the lib option. The documentation seems to indicate using
semicolon to separate the two directory paths, but it didn't work. I've
also tried comma and space. No matter what I do, it always fails to find
the assembly in the second directory. Any ideas?

dax
 
You should be using the CodeDOM instead. We will be deprecating that class
in future versions.

But to answer your question, use the pipe character (|) to separate path
names.
 
I just tried the pipe character. It didn't find the assembly either. The
string I'm passing to the lib option looks like:
c:\dir1\ | c:\dir2\

where myassem.dll is located in c:\dir2

It's good to know you're deprecating this class, but I have to use it for
the meantime. Thanks,

dax
 

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