/lib

Specifies assembly reference locations.

/lib:dir1[, dir2]

dir1

A directory for the compiler to look in if a referenced assembly is not found in the current working directory (the directory from which the compiler is invoked) or in the common language runtime's system directory.

dir2

One or more additional directories for searching for assembly references. Separate additional directory names with a comma or semicolon.

The /lib option specifies the location of assemblies referenced via the /reference option.

The compiler searches for assembly references that are not fully qualified in the following order:

  1. Current working directory. This is the directory from which the compiler is invoked.

  2. The common language runtime system directory.

  3. Directories specified by /lib.

  4. Directories specified by the LIB environment variable.

Use /reference to specify an assembly reference.

/lib is additive; specifying it more than once appends to any prior values.

Compile t2.js to create an .exe. The compiler will look in the working directory and in the root directory of the C drive for assembly references.

jsc /lib:c:\ /reference:t2.dll t2.js

Community Additions

ADD
Show: