title: Moving away from Bower (discontinued) to use Yarn/Npm instead (.Net Core MVC) VS2017
body: <p>I started working on a .Net Core application around 1 year ago. I used .Net Core to set up my project in visual studio and used Bower to manage my client side packages. It seems <code>bower</code> is <a href="https://bower.io/" rel="noreferrer">being maintained/discontinued</a> and the "people in charge" suggest using <code>yarn</code> or <code>webpack</code> instead. </p>
  
  <p>So my question is how do I start using <code>yarn</code> instead of <code>bower</code>? (or npm if that is more appropriate)</p>
  
  <p>When I started my project I used bower from within the Visual Studio package manager by simply by typing:</p>
  
  <pre><code>bower install &lt;package-name&gt;
  </code></pre>
  
  <p>And it managed to install the files/directories within my <code>wwwroot/lib/</code> folder. I just had to add the dependency to my <code>_Layout.cshtml</code> and everything worked flawlessly.</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
      asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
      asp-fallback-test="window.jQuery"&gt;
  &lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
      asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
      asp-fallback-test="window.jQuery &amp;&amp; window.jQuery.fn &amp;&amp; window.jQuery.fn.modal"&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>I find it quite hard to figure out how to use yarn or npm to achieve the same "easyness" within Visual Studio 2017. I already have access to minifying files through the <code>BundlerMinifier.Core</code> NuGet package, and I believe it does it automatically for files within my , so that is not a requirement for the solution I want to use.</p>
  
  <p>I have tried googling, but it seems this is not a very common problem. And all the links I found suggested using npm and set up gulp for moving files to <code>wwwroot/lib/</code> and I tried that but I am getting some weird errors in doing so.</p>
  
  <p>How can I use <code>yarn</code> to install packages with similar as I did with <code>bower</code>? or should I use <code>npm</code> instead?</p>