Nuget,比较已安装和最新版本 [英] Nuget, compare installed vs latest version

查看:211
本文介绍了Nuget,比较已安装和最新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从Nuget控制台获取这样的列表吗?

Can I get a list like this from the Nuget console:

Id          Installed Version           Latest Version  
----        -----------------           ----------------  
NHibernate  3.3.0.4000                  3.3.3.4001

对于解决方案中的所有项目,甚至更好?

And even better, for all the projects in the solution?

想法?

推荐答案

您可以将其全部粘贴到Package Manager控制台中的一行:

You can paste this all as one line in the Package Manager Console:

$updates = @{}; Get-Package -Updates | foreach { $updates.Add($_.Id, $_.Version) }; Get-Package | foreach { New-Object Object | Add-Member NoteProperty Name $_.Id -PassThru | Add-Member NoteProperty 'Installed Version' $_.Version -PassThru | Add-Member NoteProperty 'Latest Version' $updates.Get_Item($_.Id) -PassThru }

这将为您提供如下结果:

This will give you results like:

Name                                       Installed Version  Latest Version
----                                       -----------------  --------------
Antlr                                      3.4.1.9004         3.5.0.2       
Autofac                                    3.2.0              3.3.0         
Autofac.Mvc5                               3.2.0                            
bootstrap                                  3.0.0              3.1.0         
EntityFramework                            6.0.0              6.0.2         
jQuery                                     1.10.2             2.1.0         
jQuery.Validation                          1.11.1                           
Microsoft.AspNet.Identity.Core             1.0.0                            
Microsoft.AspNet.Identity.EntityFramework  1.0.0                            
Microsoft.AspNet.Identity.Owin             1.0.0                            
Microsoft.AspNet.Mvc                       5.1.0              5.1.1         
Microsoft.AspNet.Razor                     3.1.0              3.1.1         
Microsoft.AspNet.Web.Optimization          1.1.1              1.1.2         
Microsoft.AspNet.WebApi                    5.0.0              5.1.1         
Microsoft.AspNet.WebApi.Client             5.0.0              5.1.1         
Microsoft.AspNet.WebApi.Core               5.0.0              5.1.1         
Microsoft.AspNet.WebApi.WebHost            5.0.0              5.1.1         
Microsoft.AspNet.WebPages                  3.1.0              3.1.1         
Microsoft.jQuery.Unobtrusive.Validation    3.0.0              3.1.1         
Microsoft.Owin                             2.0.0              2.1.0         
Microsoft.Owin.Host.SystemWeb              2.0.0              2.1.0         
Microsoft.Owin.Security                    2.0.0              2.1.0         
Microsoft.Owin.Security.Cookies            2.0.0              2.1.0         
Microsoft.Owin.Security.Facebook           2.0.0              2.1.0         
Microsoft.Owin.Security.Google             2.0.0              2.1.0         
Microsoft.Owin.Security.MicrosoftAccount   2.0.0              2.1.0         
Microsoft.Owin.Security.OAuth              2.0.0              2.1.0         
Microsoft.Owin.Security.Twitter            2.0.0              2.1.0         
Microsoft.Web.Infrastructure               1.0.0.0                          
Modernizr                                  2.6.2              2.7.1         
Newtonsoft.Json                            5.0.6              6.0.1         
Owin                                       1.0                              
RavenDB.Client                             2.5.2750                         
Respond                                    1.2.0              1.3.0         
WebGrease                                  1.5.2              1.6.0         

这篇关于Nuget,比较已安装和最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆