Extending the NuGet Command Line

The NuGet command line tool is built in a very extensible fashion. For starters, every command that the command line tool exposes implements the same ICommand interface. In addition, the tool is using the Managed Extensibility Framework (MEF) to import (actually ImportMany) these commands within the scope of the application’s lifetime. It does this by scanning its own assemblies and a special extensions folder defined by the command line tool. This special extensions folder can be found in the following location on your system:

%LocalAppData%\NuGet\Commands

images Note The NuGet command line tool is a very nice example ...

Get Pro NuGet 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.