简体   繁体   中英

Can't find files after installing jquery ui via nuget in .net core application

When using nuget with the command 'Install-Package jQuery.UI.Combined -Version 1.12.1' in a .net core application, it seems to succeed except that I do not see where the files were installed to. Looking in wwwroot/lib reveals nothing. I'm sure I could just manually copy over the files and make it work, but that kind of defeats the purpose of using a package manager.

I only just started playing with .Net Core and maybe this is a known issue, or maybe I'm doing something wrong... I don't know. But if anyone could shed some light on this I'd appreciate it.

UPDATE: I used NPM (which I've never used before until now) and found that I also needed to install a bundler/minifier extension for visual studio. Using this I managed to bundle my js files, but first required that I create a new js file to bundle into, which I saved in my wwwroot folder. Then I just added a reference to the bundled js file in my view and it worked.

Steps taken:

  1. Install package via npm
  2. Right click gulpfile.js and select bundler and minifier
  3. bundleconfig.json is updated
  4. Create js file in wwwroot/js folder where minified file while be created
  5. In bundleconfig.json change outputfilename of your packages to same location as step 4 (eg. "wwwroot/js/app-bundle.min.js")
  6. Right click bundleconfig.json and update bundles
  7. Include minified js in your view

在此输入图像描述 在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM