Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

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

0.00/5 (No votes)
1 Oct 2016 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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here