CSC.EXE Compiler Error when /Lib switch have reference path with s

G

Guest

Hi Friends,

I am facing trouble with dynamically compiling C# source files. Here is the
example:

Following command works:
csc.exe /out:test.dll /target:library /r:system.dll,Infineon.FD.Repository.S
hared.dll
/lib:E:\Pratik\FD\SourceCode\RE_TB\GUI\REGUI\bin\Debug\RepositoryBin\
test.cs

But when there is space in /lib: reference path. If fails!!! See following
example:

csc.exe /out:test.dll /target:library /r:system.dll,Infineon.FD.Repository.S
hared.dll /lib:E:\Pratik\FD\SourceCode\RE_TB\GUI\REGUI\bin\Debug\Repository
Bin\
test.cs

In first example /lib reference path doesn't have space. So it works. But,
in second example there is a space in /lib: reference path, Repository Bin,
it fails!!!

Even I tried putting reference path in quotes, like following example. Still
It fails.

csc.exe /out:test.dll /target:library /r:system.dll,Infineon.FD.Repository.S
hared.dll /lib:"E:\Pratik\FD\SourceCode\RE_TB\GUI\REGUI\bin\Debug\Repository
Bin\" test.cs

Please reply, if you have the solution.....

Awaiting your response...

Thanks in advance,
Pratik Mehta
 
W

Wiktor Zychla

try to put quotation marks around the whole lib switch

"/lib:E:\Pratik\FD\SourceCode\RE_TB\GUI\REGUI\bin\Debug\Repository Bin\"

regards,
Wiktor Zychla
 

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

Top