History
I created a new ASP.NET MVC 4.0 project that was basic and didn't include jQuery or other scripts that the Intranet and Internet templates insert by default. I then went to add the scripts using NuGet and installed the latest version of all the jQuery and related files that are normally installed by the MVC Intranet and Internet templates.
When I tried running the application I started to receive errors. Apparently there are incompatibilities with the libraries/extensions that were written previous to jQuery 1.9. It seemed like after fixing an issue I'd run into another. I finally gave up and copied the versions of the js files that would have installed. This resolved the issues I was able to use features such as remote validation.
Questions
Since I'm new to ASP.MVC, I'd like to know what the Best Practice is related to jQuery updates. I assume I need to wait until all the libraries/extensions have caught up, but I would need to follow the status of each library/extension to determine when I could upgrade.
- Is it simply better to wait and just use the versions that are installed with the MVC templates and not upgrade? And when the next update for MVC comes out, then copy those libraries/extensions into the scripts folder that the updated templates use?
- I noticed that the MVC templates do not install the jQuery NuGet packages but install files to the Content and Script folders. Is this to prevent developers from upgrading and experiencing the issues I found with using newer version of the libraries/extensions?
- Does Microsoft time updates to jquery.unobtrusive-ajax.js and related libraries to updates to ASP.NET MVC? If so then it would seem to make sense to hold off updating dependencies until ASP.NET MVC is updated.