转,Nuget 命令, install-package, update-package

(! update-package -project XXXProjectName -reinstall)

管理nuget程序包,有时不能有效检测,可以直接用命令更新页面

 

(1)来自:https://www.cnblogs.com/berlin/archive/2016/11/12/6057129.html

Nuget的VS 指令

1.安装指定版本类库
install-package unity -version 3.5.14

2.安装到指定的项目
install-package unity -project XXXProjectName -version 3.5.14

3.重新安装所有Nuget包(整个解决方案都会重新安装)
update-package -reinstall

4.重新安装指定项目所有Nuget包
update-package -project XXXProjectName -reinstall

5.卸载Nuget包
uninstall-package unity

 

(2)

常用:

安装mvc, Install-Package Microsoft.AspNet.Mvc -Version 5.0.0

安装signalr, Install-Package Microsoft.AspNet.SignalR

安装log4net, Install-Package log4net    //第二步:Log4net的配置log4net.config注意:将log4net.config的属性“复制到输出目录”设置为“始终复制”

安装Newtonsoft.Json, install-package Newtonsoft.Json

 

 

其他,转,


Install-Package AutoMapper

Install-Package NVelocity

Install-Package mobiscroll

Install-Package SweetAlert

Install-Package NPOI

Install-Package litjson

Install-Package ThoughtWorks.QRCode

Install-Package ServiceStack.Redis

Install-Package jQuery.Validation

控制台:

Install-Package Spring.Core(mvc 下只安装这一个就可以)

Install-Package Spring.Data

asp.net mvc4 :

Install-Package Spring.Web.Mvc

Install -package Microsoft.AspNet.SignalR

Install -package Microsoft.AspNet.Identity.Samples -Version 2.0.0-beta2 -Pre

Install-Package Microsoft.AspNet.Mvc

Install-Package Microsoft.AspNet.Mvc -Version 5.0.0

Install-Package Microsoft.AspNet.Mvc -Version 5.2.2

Install-Package Quartz

Install-Package knockoutjs

Install-Package MyCommonLib

Update-Database MyCommonLib

Uninstall-Package MyCommonLib

Install-Package mypackage

Install-Package MyWebForm

Install-Package MyMemcached

Install -package jquery

Install-Package Microsoft.AspNet.Web.Optimization

Install-Package EntityFramework

Install-Package Newtonsoft.Json

Install-Package log4net

Install-Package ELMAH

Install-Package ELMAH.mvc

Install-Package Pagedlist.mvc

Install-Package aspnetpager

Install-Package Senparc.Weixin.MP

Install-Package Senparc.Weixin.MP.MVC

Install-Package Microsoft.AspNet.Identity.Samples -Pre

Install-Package Microsoft.AspNet.Identity -Pre

Update-Database

Update-Database -TargetMigration:"AddRealUserName"

Update-Database -TargetMigration:$InitialDatabase 回到最初始的数据库

Update-Database -Force -TargetMigration:"AddRealUserName"

Update-Database -Force -TargetMigration:"AddUserAge"

Update-Database -Script -SourceMigration:$InitialDatabase -TargetMigration:"AddRealUserName" 获取迁移的脚本

Update-Package mypackage

Update-Package EntityFramework

update-package Newtonsoft.Json

Update-Package EntityFramework

Update-Package jquery

Update-Package Newtonsoft.Json

Uninstall-Package Newtonsoft.Json

Uninstall-Package mypackage

Uninstall-Package MyWebForm

Uninstall-Package PagedList

Uninstall-Package Pagedlist.mvc

Uninstall-Package log4net

Uninstall-Package ELMAH

Uninstall-Package ELMAH.mvc

posted @ 2018-05-14 15:57  以函  阅读(563)  评论(0编辑  收藏  举报