Sunday, August 23, 2015

Live undefined after installing jquery.Unobtrusive.Ajax

If you install the old versions  of jquery.Unobtrusive.Ajax you may get a slew of error such as "live" undefined.

To resolve go to the you Nuget Package Manager Console (In Visual Studio: Tools -> Nuget  Package Manage -> Package Manager Console) and issue (or re-issue) the following command


 Install-Package Microsoft.jQuery.Unobtrusive.Ajax

   
Nuget will uninstall the faulty old package and install the corrected one:
Added package 'Microsoft.jQuery.Unobtrusive.Ajax.3.2.3' to 'packages.config'
    Successfully installed 'Microsoft.jQuery.Unobtrusive.Ajax 3.2.3' to AsyncWithScaffold
    Removing package 'Microsoft.jQuery.Unobtrusive.Ajax.2.0.20710' from folder 'C:\Training\SecurityWithEmail\packages'
    Removed package 'Microsoft.jQuery.Unobtrusive.Ajax.2.0.20710' from folder 'C:\Training\SecurityWithEmail\packages'


Of course if you have references to "live" in your Javascript code you need to resolve them manually.

No comments: