updating Visual Studio templates on new release of jQuery (and other libraries)

Chase Florell picture Chase Florell · May 26, 2010 · Viewed 15.4k times · Source

Now that Visual Studio => 2010 has jQuery support, I'm wondering how I can update the project template when a new jQuery release comes out? Currently when you create a project, it automatically creates the 1.4.1 files (in VS2010), but jQuery is ever evolving, and often updates it version.

How can I tell Visual Studio to use the more recent version of jQuery (or other libraries for that matter)?

Answer

Jeremiah Flaga picture Jeremiah Flaga · May 17, 2012

You can use NuGet

  1. right-click on your project in Solution Explorer
  2. click on "Manage NuGet Packages" in context menu
  3. type "jQuery" in the search box on the top right corner of the dialog box
  4. press Enter key and wait for results
  5. look for "jQuery" in the results, SELECT it and click "Install" button
  6. (after installation, you previous jquery and related files will be replaced with the latest ones)

Alternatively, you can create an Empty project and install the the nuget package(s) through the Package Manager Console. This can include ALL of the libraries that you default to.

PM> Install-Package jQuery

From there, save it as a new template, and whenever you create a new project, simply run the following terminal command before starting work.

PM> Update-Package

more info on Update-Package