Do unused references to external assemblies lead to code bloat?
The .NET platform promotes the binary reuse of types. It is common practice to set references to external assemblies using Visual Studio .NET’s Add Reference menu item. Many developers believe that adding unnecessary and, therefore, unused external references will result in code bloat—binary code loaded into the program even though unused. But, in fact, when assembly references are added or the using keyword is used, csc.exe—the C# compiler—ignores assemblies which are not actually used by the application. For example, if references to System.Net.dll and System.Reflection.dll were added, but were not otherwise referenced in the application, the compiler would only reference the mandatory mscorlib.dll.