csc /lib compiler option (VS.NET 2003)

  • Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date
N

Nicholas Paldino [.NET/C# MVP]

Kit,

You should place the quotes around the whole option, like so:

csc /reference:Fred.dll "/lib:A Directory"

Hope this helps.
 
K

Kit Ewbank

I'm trying to reference an assembly in a directory which has a space in its
name. When I use the VS.NET 2003 csc's /lib option with quotes around the
directory name (e.g. /reference:Fred.dll /lib:"A Directory"), it fails to
find the assembly (error CS0006: Metadata file 'Fred.dll' could not be
found).
If I remove the quotes and the space in the directory name, all is OK. If I
remove the space in the directory name but don't remove the quotes, I get
the same error.
Any advice?

Thanks,

Kit
 
G

Grant Richins [MS]

And if that doesn't work try using the LIB environment variable.
Unfortunately this is somewhat limited by the underlying OS "SearchPath"
API.

--
--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.


Nicholas Paldino said:
Kit,

You should place the quotes around the whole option, like so:

csc /reference:Fred.dll "/lib:A Directory"

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Kit Ewbank said:
I'm trying to reference an assembly in a directory which has a space in its
name. When I use the VS.NET 2003 csc's /lib option with quotes around the
directory name (e.g. /reference:Fred.dll /lib:"A Directory"), it fails to
find the assembly (error CS0006: Metadata file 'Fred.dll' could not be
found).
If I remove the quotes and the space in the directory name, all is OK.
If
I
remove the space in the directory name but don't remove the quotes, I get
the same error.
Any advice?

Thanks,

Kit
 

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