By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,330 Members | 1,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,330 IT Pros & Developers. It's quick & easy.

csc /lib compiler option (VS.NET 2003)

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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]
- ni**************@exisconsulting.com

"Kit Ewbank" <Ki********@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP12.phx.gbl...
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

Nov 13 '05 #2

P: n/a
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 [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
in message news:uF***************@tk2msftngp13.phx.gbl...
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]
- ni**************@exisconsulting.com

"Kit Ewbank" <Ki********@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP12.phx.gbl...
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


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.