Click here to Skip to main content
15,889,857 members
Articles / Web Development / ASP.NET
Tip/Trick

How to Get Missing jquery.validate.js File in ASP.NET Core MVC Project

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
1 Oct 2016CPOL1 min read 13.7K   2   1
A common problem working with Bower (Client-Side Package Manager of ASP.NET Core), missing dist folder with js file

Introduction

Recently, I was working on an ASP.NET Core MVC Project and faced a very weird problem. So I thought I could share the solution as it might help someone who is facing the same problem.

Background

I created an empty ASP.NET Core MVC web application in VS2015. 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/, there's supposed to be a folder called dist and within this folder, I should be able to find jquery.validate.js and its "child" - the jquery.validate.min.js. There were no such files there. You can see the folder structure of my project in the below image:

Solution

There might be another solution but I just solved this problem by running the Grunt file. It'll 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.

Hope it'll help you guys. Thanks for reading.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions

 
QuestionThank you for sharing this information Pin
Michael Lockwood21-Jan-17 13:21
professionalMichael Lockwood21-Jan-17 13:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.