Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower ASP.NET Core MVC missing jquery.validate.js file

UPDATE: Visual Studio - File - New - Project - ASP.NET Core Web Application (.NET Core) - Web Application


I left the default name WebApplication1

  • expand the wwwroot folder
  • expand up to wwwroot/lib/jquery-validation

  • in the jquery-validation folder we can see this (see img below)
    jquery-validation folder BEFORE UPDATE



- right click the WebApplication1 project in the src folder - click on Manage Bower Packages - Bower Package Manager screen asking to update jquery and jquery-validation (see img below)
BowerPackageManager BEFORE UPDATE

  • clicked Update jquery **everything looks normal (see img below)
    BowerPackageManager after jquery update

  • clicked Update jquery-validation dist folder has disappeared (see img below)
    enter image description here

jquery-validation AFTER UPDATE


The text below is before I UPDATED this Q

I created an empty ASP.NET Core MVC web application in VS2015CE. I added the bower.json file, that manages client-side stuff of the app. Via Bower I downloaded jquery, jquery-validate, jquery-validate-unobtrusive.

Bower created a lib folder in the wwwroot folder. Somewhere in the ~/lib/jquery-validate/ I should be able to find jquery.validate.js and it's "child" - the jquery.validate.min.js There were no such files there, so I became suspicious and I created another project, this time a NOT empty web application.

I then compared both jquery-validate folders in the lib folders of the two applications.

  • My first project (created as EMPTY) has the following folder structure:

enter image description here

dist folder is not present


  • My second project (created as WebApplication, NOT empty) has the following folder structure:

enter image description here

dist folder is present and inside it there's the jquery.validate.js file and also it's child, the jquery.validate.min.js file.


What am I doing wrong? Or is it a bug in VS2015? Or a Bower bug?

like image 708
PaxForce Avatar asked Jul 08 '16 14:07

PaxForce


1 Answers

You need to run the Grunt file which will build the dist folder for you. The best way I've found to do this right now is to install the Grunt Launcher extension. You can then right click on the package.json file within the jQuery-validation folder and select "NPM Install". That should build the dist folder for you.

I haven't found a way to automate this yet, but I'm sure there is. Just started using Gulp and wasn't using Grunt until I ran into the problem you're having. If someone has some tips there, that would be great. Good luck!

like image 72
James Stevens Avatar answered Oct 02 '22 05:10

James Stevens