Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

How to Add Client-side Library to ASP.NET CORE 2.2 using VS2017 (The Easy Way)

0.00/5 (No votes)
10 Dec 2018 1  
Easy way to Install Client Side Library Using UI on VS 2017 ASP NET Core 2.2 Projects

Introduction

Libman is a lightweight, client-side library acquisition tool. It works perfectly for simple web apps or projects that do not need advanced tools (e.g.: npm/web pack) which is an overkill for small apps. Earlier, bower was used on VS 2017 but unfortunately, things went sour for bower so VS Team opted to use to Libman.

And as of this time of writing, Libman now has a UI editor which makes installing client side libs easy (If you're not confident to meddle with libman.json yet).

Prerequisite

Have these installed on your dev machine.

  • Latest VS 2017 (Community Edition is free), select ASP.NET and web development workload - link
  • NET Core SDK - link

Step by Step

  1. Create a new ASP.NET Core Project.

  2. Select ASP.NET CORE 2.2, then select MVC web application. Leave the rest as is, then click OK.

  3. Select Project File, right click to open context menu. Click Add -> Client-Side Library

  4. A friendly Wizard Window will appear to help you install your library.

    In this case, I will add react, I will input "react" on text box and a drop down will list libraries related to text.

    I can choose provider of package and what files to install too.

  5. After hitting install, selected lib will be added to project.

    This will create libman.json and will serve as a starting point for you to get your hands dirty and make custom settings for client-side library.

External References

Updates

  • 12-11-2018: Updated image paths

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here