Wed. Nov 13th, 2019

Microsoft launches Library Manager in Visual Studio 2017

2 min read

Microsoft officially launched the Library Manager (LibMan) in Visual Studio 2017 15.8. LibMan first appeared in the 15.7 previews released in April but was removed in the final build of 15.7. Now, LibMan reappears in VS2017 15.8 and has provided stable use to provide a lightweight alternative to Bower. LibMan takes the files needed by the web application and places them in the directory you specify for the web application.

LibMan

LibMan is not a package manager, not a tool to replace package managers like npm or yarn. When developing modern web applications, developers may need to reference libraries like jQuery or Bootstrap. The most common practice in the past was that developers might copy from previous projects, download them from the Internet, or use the package manager Bower. But because Bower announced that they would no longer provide support, Microsoft has developed LibMan, hoping that Web developers can efficiently manage commonly used client libraries.

LibMan is lightweight and simple, allowing developers to query and download libraries from external sources such as CDNJS and put them into projects. But Microsoft emphasises that LibMan is not a package manager and is not intended to be a replacement for these tools. When projects don’t need tools such as Node, npm, Gulp, Grunt, and WebPack, you need to add a few libraries, which is excellent for using LibMan. LibMan allows developers to put files in a specific location, without the need for additional builds or copying and is very space-saving because developers only need to download the files they need, so they take up less space in the project.

Compared to the preview version, the official release has added some new features. The developer clicks the right mouse button on any folder in the Web project and selects the new client library. The dialogue interface is launched, allowing the developer to browse the available libraries and files, and to set the location where the files are placed.

In combination with CDNJS and FileSystem, LibMan has also added a new library source UnPkg, which provides more libraries than CDNJS. Also, with the release of Visual Studio 2017 15.8, the LibMan Command Line Interface (CLI) has been developed as a global tool for the .Net CLI and is available on NuGet. Because the CLI is cross-platform, developers can use it on Windows, Mac, or Linux, any platform that supports .NET Core.