Install-Package JQuery Conflict occurred 问题

来源:互联网 发布:mac怎么终止程序 编辑:程序博客网 时间:2024/06/15 16:31

在VS.net 2010中,跟前面的主题一样,Becomplex, but be flexible,善于利用工具,非常重要了。

打开Tool-Library package manager->packagemanager console。

 

PM> Install-Package JQuery'jQuery 1.7.1' already installed.Install-Package : Conflict occurred. 'jQuery 1.5.1' referenced but requested 'jQuery 1.7.1'. 'jQuery.vsdoc 1.5.1, jQuery.Validation 1.8.0, jQuery.UI.Combined 1.8.11' depend on 'jQuery 1.5.1'.At line:1 char:16+ Install-Package <<<<  JQuery    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

 

//根据以上的提示,要么把其它存在依赖的东西删除,要么更改升级顺序

根据一段时间的测试,发现按照如下的顺序来做,应该可以解决以上的问题。

update-package jQuery.UI.Combinedupdate-package jQuery.Validationupdate-package Modernizupdate-package jQuery.vsdocupdate-package jQuery

This order allows jquery to update via nuGet correctly. I hope this helpsother frustrated nuGet noobs.

 


PM> get-package
 
Id                             Version              Description                                                        
--                             -------              -----------                                                        
EntityFramework                4.3.1                Entity Framework is Microsoft’s recommended data access technolo...
jQuery                         1.5.1                jQuery is a new kind of JavaScript Library....                     
jQuery                         1.7.1                jQuery is a new kind of JavaScript Library....                     
jQuery.UI.Combined             1.8.11               jQuery UI is an open source library of interface components — in...
jQuery.Validation              1.8.0                This jQuery plugin makes simple clientside form validation trivi...
jQuery.vsdoc                   1.5.1                Includes vsdoc files for jQuery 1.5.1 that provide IntelliSense ...
Modernizr                      1.7                  Modernizr adds classes to the <html> element which allow you to ...

 

最后,可以通过Packages文件来查看各种版本:

<?xml version="1.0" encoding="utf-8"?><packages>  <package id="EntityFramework" version="4.3.1" />  <package id="jQuery.UI.Combined" version="1.8.18" />  <package id="jQuery.Validation" version="1.9" />  <package id="Modernizr" version="2.5.3" />  <package id="jQuery.vsdoc" version="1.6" />  <package id="jQuery" version="1.7.1" /></packages>

 

原创粉丝点击