1

How do I make Visual Studio add the latest version of Jquery to the scripts folder when I create a new Asp.Net application on Visual Studio 2010?

Thanks

1 Answer 1

1

I think you have to define your own project template (or edit the existing one). In the .vstemplate file you have a section where you can define which packagaes have to be installed when creating a new project with this template. If you have a look at the Asp.net MVC template you see that there are a few packages defined which are installed by Nuget.

<WizardData>
        <packages>
            <package id="jQuery" version="1.5.1" />
            <package id="jQuery.vsdoc" version="1.5.1" />
            <package id="jQuery.Validation" version="1.8.0" />
            <package id="jQuery.UI.Combined" version="1.8.11" />
            <package id="EntityFramework" version="4.1.10331.0" />
            <package id="Modernizr" version="1.7" />
        </packages>
    </WizardData>
</VSTemplate>

In this template there is a version defined for jquery, but if you remove this version number than Nuget will automatically install the latest version of JQuery which is right now something like 1.6.1.

To be honest I never have updated or created a new template, so for the exact steps I can only give you the references. Hope that this will guide you into the right direction:

Creating a new project template: http://msdn.microsoft.com/en-us/library/ms247065.aspx

Existing templates can be found in the following location: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates

I think only Nuget has the option to check for the latest version of JQuery to download, using a CDN would require a version number.

Hope this will help you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.