还有一个“Microsoft.jQuery.Unobtrusive.Validation”,我应该在删除jQuery包之前卸载它。
现在我尝试(重新)安装jQuery包,以及之前删除的所有依赖包。 “Microsoft.jQuery.Unobtrusive.Validation”包打破说:
Attempting to resolve dependency ‘jQuery (≥ 1.8)’.
Attempting to resolve dependency ‘jQuery.Validation (≥ 1.8)’.
Attempting to resolve dependency ‘jQuery (≥ 1.3.2 && ≤ 1.6)’.
Updating ‘jQuery 1.8.0’ to ‘jQuery 1.4.1’ Failed.
Unable to find a version of ‘Microsoft.jQuery.Unobtrusive.Validation’ that is
compatible with ‘jQuery 1.4.1’.
是吗?我需要使用最新的jQuery(2.0.xx)!
我应该注意类似的“Microsoft.jQuery.Unobtrusive.Ajax”包没有这个’bug’。安装没有问题。
PS。现在我尝试安装(非Microsoft)jQuery.Validation …
这是错误日志:
Attempting to resolve dependency ‘Microsoft.jQuery.Unobtrusive.Validation (≥ 2.0.20613.0)’.
Attempting to resolve dependency ‘jQuery.Validation (≥ 1.8 && < 2.0)’.
Attempting to resolve dependency ‘jQuery (≥ 1.3.2 && ≤ 1.6)’.
Installing ‘jQuery 1.4.1’. Successfully installed ‘jQuery 1.4.1’.
Installing ‘jQuery.Validation 1.8’.
Successfully installed ‘jQuery.Validation 1.8’.
Installing ‘Microsoft.jQuery.Unobtrusive.Validation 2.0.20710.0’.
Successfully installed ‘Microsoft.jQuery.Unobtrusive.Validation 2.0.20710.0’.
Installing ‘jQuery.Validation.Unobtrusive 2.0.20710.0’.
Successfully installed ‘jQuery.Validation.Unobtrusive 2.0.20710.0’.
Install Failed.
Rolling back…
Updating ‘jQuery 1.9.0’ to ‘jQuery 1.4.1’ Failed. Unable to find versions of ‘bootstrap,jQuery.BlockUI,Microsoft.jQuery.Unobtrusive.Ajax’ that are compatible with ‘jQuery 1.4.1’.
使用NuGet我添加了“jQuery”,然后是“jQuery Validatation”再次尝试“Microsoft jQuery Unobtrusive Validation”,这次安装得很好:)