We know that in a Non-empty Web project (including WebForm and MVC) in Visual Studio , the jquery library is automatically included in the project's Scripts folder.
Click to enlarge
But careful people have seen that the jquery version contained in the official version is the 1.4.1 version, not the 1.4.2 version of the latest jquery official release. In the new version of the efficiency of the great increase and the repair of some bugs, recommend everyone to use 1.4.2 version, and give up the 1.4.1 version. The simple adjustment of a single item is to remove the old version and then add the corresponding file on version 1.4.2. But many of us may prefer to create later projects are 1.4.2 version rather than 1.4.1 version, how to do? I have mentioned in the relevant webcast, that is, to the VS2010 installation directory to modify the project template related files. The directory location takes the project for C # as an example:
- X86:program Files\Microsoft Visual Studio 10.0\common7\ide\projecttemplates\csharp\web\1033
- X64:program Files (x86) \microsoft Visual Studio 10.0\common7\ide\projecttemplates\csharp\web\1033
The files that need to be modified are yellow in the following image:
Click to enlarge
Copy the three files, then unzip them, and do the following:
- Delete and update the jquery related files in the Scripts folder to the latest version, including Jquery-1.4.2-vsdoc.js,jquery-1.4.2.js,jquery-1.4.2.min.js, etc.
- Then modify the reference in the Xxxxx.csproj file about jquery1.4.1 to 1.4.2
- Finally, replace the jquery-1.4.1 in the Xxxxxx.vstemplate file with the jquery-1.4.1
- Save the above changes and package them as zip files
- Overwrite the new zip file with the same name back to the directory where the project template resides
- Then overwrite the file before the package into the cache directory of the project template (Projecttemplates of the project template path to Projecttemplatescache)
- Complete