Can I execute npm commands (e.g. npm init, npm install) directly from Visual Studio 2017 on Asp.Net Core 2.0 project? May be from command line or context menu? Now I have context menu command for Bower, when right click on MVC project in Solution Explorer, but i'm not use bower in my project.
Can I execute npm commands directly from the visual studio
29.7k views Asked by Anton Gorbunov At
3
There are 3 answers
0
On
There is a new tool included in Visual Studio v15.8 called Library Manager for installing client side libraries. I've been trying it out after looking for a quick and easy solution to install NPM packages, and I must say it has been a pleasure to use!
You can install any NPM package by simply selecting the UnPkg provider in the GUI, or setting it in your libman.json file, like so:
"defaultProvider": "UnPkg"
Fast, lightweight, and works like a charm. Give it a try!
0
On
Another solution if you want separate window instead of Package Manager Console: NPM task runner extension
This tool will add fancy window to run commands from package.json file (I assume you have one)
You can use the Package Manager Console like you would a regular console. The Package Manager Console in Visual Studio acts like a PowerShell console. NPM commands such as
initandinstallare available ifnpmis on your classpath.The Package Manager Console is found under Tools -> NuGet Package Manager -> Package Manager Console.