I want to contribute to a correct answer by Simon.
Not only other assemblies depend on mscorlib; there is something else which always uses this library. In particular, this is C# language.
You can always avoid explicit use of any libraries at all. You can create a class library not using
System
namespace. For example, it could implement some pure numerical or string manipulation algorithms from scratch and export them in the form of public classes/structures and methods. (Why just the library? Yes, it can be even an application, but quite useless one as it could not output anything without the libraries.)
Will it use mscorlib? It will, because you need to use at least embedded types like
int
,
uint
,
double
,
string
and the like. Yes, all these identifiers are keywords of the language, but they are implemented as the
aliases of
System.Int32
,
System.UInt32
,
System.Double
and
System.String
, respectively.
[EDIT]
Thanks to Simon for bringing the issue of dependency of all the types upon
System.Object
. This problem is not that simple. Consider the following:
int value = 13;
System.Console.WriteLine("Value={0}", value);
static void WriteLine(string format, params object[] parameters);
See
http://msdn.microsoft.com/en-us/library/yz2be5wk.aspx[
^].
—SA