Deepanjan Nag
Deepanjan Nag

Reputation: 921

Using the latest jQuery files in Visual Studio

When I use a web template in Visual Studio 2012 like MVC 4, the script folder is already filled with the jQuery files. All this is fine, except that each time a version that isn't the latest is used. I then have to either manually bring in the latest jQuery files or use NuGet.

Is there a way to automatically get the latest jQuery files when a project is created in Visual Studio?

Upvotes: 3

Views: 1866

Answers (1)

Chamika Sandamal
Chamika Sandamal

Reputation: 24302

you can change the template file directly to do this for all the new projects. more details follow this link.

Note: I'd recommend you to create your own project template so you can always revert back to the default one in case you, or someone else, is going to mess things up

All Visual Studio (2012) project templates can be found here:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates\

If you want to create some custom project templates, I'd recommend you to create them here:

%USERPROFILE%\Documents\Visual Studio 2012\Templates\ProjectTemplates

For the MVC4 CSHTML project template. You can find it here:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ProjectTemplates\CSharp\Web\1033\MvcWebApplicationProjectTemplatev4.0.cshtml\

To modify the files, you'll have to edit them as Administrator.

Update the following section like mention here to update the dependency to version 1.8.2 by default.

<WizardData>
        <packages repository="registry" keyName="AspNetMvc4VS11" isPreunzipped="true">
            <package id="EntityFramework" version="5.0.0" skipAssemblyReferences="true" />
            <package id="jQuery" version="1.8.2" />
...

Upvotes: 2

Related Questions