jeremiah johnson <na*******@gmail.com> wrote:
Is there a way to reproduce the CLASSPATH functionality of Java within
C#? Would there ever be a reason to do this? Is there a reason *not*
to do this? There must be, I think, or there would probably be a
CLASSPATH environment variable.
I'm tired of typing /r:... at the command line. I have an IDE, and I
use it, but on some systems there is no IDE and when I want to make a
quick code change and recompile, there's no CLASSPATH to help me.
Why no CLASSPATH environment variable equivalent?
One thing you can do is to use a custom response file if you find
yourself using the same references frequently. An example (and the one
used by default) is in the .NET framework directory - csc.rsp. You can
specify one on the command line by doing
csc @foo.rsp X.cs Y.cs etc
I don't know of any environment variables which do the same, but they
may be there.
Interestingly, these days I think Java developers tend to try to avoid
using the CLASSPATH environment variable, preferring to explicitly
specify the jars/paths on the command line. There are advantages and
disadvantages of both ways, however.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too