9

Hey so when i start a new solution and pick "web application" visual studio goes ahead and by default creates a script folder with jquery-1.4.1.js, jquery-1.4.1.min.js, and jquery-1.4.1-vsdoc.js. But if I instead start a new solution and pick "empty web application" there are no folders which is to be expected obviously. I am just wondering what is the best way to add jquery into my new project, should i just copy and paste the scripts folder from a default web application?

thanks in advance!

chilleo
  • 536
  • 3
  • 9
  • 23

5 Answers5

9

Use NuGet! It will install things in the proper folders, and keep track of things for you. No reason to do this yourself anymore.

Right click on your solution, choose manage packages. Search for jquery and install it. You might need to install the Nuget package manager if you haven't got it already.

Dervall
  • 5,736
  • 3
  • 25
  • 48
4

Use nuget package http://nuget.org/packages/jquery

The command is "Install-Package jQuery"

amdmax
  • 771
  • 3
  • 14
1

Or may be you can make a collection of needed files every time you use in your project and paste that files to empty project...

naim shaikh
  • 1,103
  • 2
  • 9
  • 20
1

You can just create a folder call script and drag the jquery libary into that folder(or use add exisitng item). New version Jquery library is available for download on http://docs.jquery.com/Downloading_jQuery

ZERO
  • 133
  • 3
0

Or let someone else's CDN do it for you....

For a more detailed explanation why, see: http://encosia.com/3-reasons-why-you-should-let-google-host-jquery-for-you/

http://docs.jquery.com/Downloading_jQuery

David Peden
  • 17,596
  • 6
  • 52
  • 72
  • got this working, cool. i think i like this answer best since it has the most justification (possible faster speeds for users) and actually i just found another similar stackoverflow question that i will probably use instead of the google CDN at least for testing purposes. the question was how to get intellisense if using a CDn which i was going to just post on this answer as a comment but fortunately that question lead me to: http://www.asp.net/ajaxlibrary/cdn.ashx which is a microsoft CDN that apparently includes intellisense? anyways thanks everyone! – chilleo Apr 19 '12 at 17:22
  • 1
    I get some nasty popups from that encosia site. Not sure if it's legit, but seems pretty questionable. – Jacob H Jun 23 '17 at 13:28