19Libraries, Assemblies, Packages, and NuGet

THE HELL OF LIBRARIES

Libraries make it possible for you to reuse code in multiple applications. With Windows, libraries have a long history, and architecture guidelines have taken different directions with newer technologies. Before .NET, dynamic link libraries (DLLs) could be shared between different applications. These DLLs have been installed in a shared directory. It wasn’t possible to have multiple versions of these libraries on the same system, but they should have been upward compatible. Of course, this wasn’t always the case. In addition, there were problems with application installations that did not pay attention to the guidelines and replaced a shared library with an older one. This was the DLL Hell.

.NET tried to solve this with assemblies. Assemblies are libraries that could be shared. In addition to normal DLLs, assemblies contain extensible metadata with information ...

Get Professional C# 7 and .NET Core 2.0, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.