jQuery-validate in MVC
I’m really glad to have NuGet in Visual Studio. Of course, I immediately ran “Update-Package jQuery”, and then merrily went along until I later discovered that my login and registration pages weren’t working anymore. The IE9 and Visual Studio debuggers were kind enough to give me this error in jquery.validate.unobtrusive.min.js:
Error: Unable to set value of the property 'unobtrusive': object is null or undefined
I could see there was a variable named “d” with an property named “unobtrusive”, but the value of “d” was unknown in the debugger.
I don’t know how much searching through code I would have done without finding a workaround or fix.
I rolled back to jquery-1.5.1, and everything was fine.
It is nice to know that there’s a version flag in NuGet’s Install-Package, so that you can pick legacy versions of packages for these situations.
PM> Install-Package jQuery -version 1.5.1 Successfully installed 'jQuery 1.5.1'. OrderManagementWeb already has a reference to 'jQuery 1.5.1'.