6

I tried to add jquery to an asp.net core project using NuGet Package Manager of Visual Studio Community 2017 (version 15.5.2), but there is no jquery js files added to my project. Here is the screenshot:

enter image description here

Tried with Bower Package Manager, then the files are downloaded to bower_components folder but not to wwwroot as many people said.

Same thing for jquery-ui, bootstrap, etc.

Anyone experienced the same problem. Is there any work-around?

BTW, this accepted solution doesn't work for me: Where are jQuery-UI scripts stored in MVC6 project?

tala9999
  • 1,540
  • 2
  • 15
  • 25
  • 2
    This seems to be Nuget's problem with .NET Core projects. We should use npm or Bower instead. More details here: https://stackoverflow.com/questions/43485684/how-do-i-include-javascript-packages-i-install-from-nuget – tala9999 Dec 26 '17 at 14:13
  • npm is nice, if your project already uses Webpack. Otherwise, LibMan is easier, see the answer of psur – Roland Jun 14 '21 at 14:42

1 Answers1

4

For ASP.NET Core in Visual Studio 2017:

  • NuGet shouldn't be used for client-side libraries.
  • After that Bower was used for this purpose, but now it is deprecated.
  • Currently the supported tool for managing client-side libraries is LibMan. Here is very good explanation how to use it in VS2017.
psur
  • 4,400
  • 26
  • 36