Package Manager Console的使用
Find-Package
PM> Find-Package autofac
https://docs.microsoft.com/en-us/nuget/tools/ps-ref-find-package
Id Versions Description
-- -------- -----------
Autofac {4.9.0} Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that applications stay easy to...
Autofac.Extras.AggregateService {4.1.0} Aggregate services are sets of dependencies you can treat as a single dependency. This extension enables support for aggregat...
Aliencube.Autofac.Extras.CommonS... {4.0.1} The Microsoft Enterprise Library provides a Common Service Locator for abstracting away IoC containers. .NET Standard port of...
Autofac.Extensions.DependencyInj... {4.3.1} Autofac implementation of the interfaces in Microsoft.Extensions.DependencyInjection.Abstractions, the .NET Framework depende...
Autofac.Configuration {4.1.0} Configuration support for Autofac.
Autofac.Extras.CommonServiceLocator {5.0.0} Autofac extension for using the Microsoft Enterprise Library Common Service Locator with Autofac.
Autofac.Extras.Moq {4.3.0} Autofac extension for automocking and creation of mock objects in Moq.
Autofac.Extras.DynamicProxy {4.5.0} Autofac extension for enabling AOP in conjunction with Castle.
Autofac.Multitenant {4.2.0} Autofac extension for multitenant application support.
Autofac.Extras.FakeItEasy {5.0.1} Autofac extension supporting generation of FakeItEasy objects.
Autofac.ServiceFabric {2.1.0} Autofac integration for Azure Service Fabric. Provides service factory implementations for Actors, Stateful Services and Stat...
NugetyCore.Autofac {1.0.1} NugetyCore.Autofac package summary
Autofac.Extras.MvvmCross {5.0.0} Autofac extension supporting MvvmCross dependency injection.
Autofac.AspNetCore.Multitenant {1.0.2} ASP.NET Core support for multitenant DI via Autofac.Multitenant.
Autofac.Extras.NLog {1.3.0} Autofac Module that integrating Autofac and NLog, it supports both constructor and property injection.
CB.Ioc.Adapter.Autofac {1.0.15.4} The adapter of autofac for CB.Ioc
Flatwhite.Autofac {1.0.26} Flatwhite.Autofac support Flatwhite cache using Autofac
Alexinea.Autofac.Extensions.Depe... {4.2.0} Autofac implementation of the interfaces in Microsoft.Extensions.DependencyInjection.Abstractions, the .NET Framework depende...
Autofac.Engine {4.3.0} MS Autofac.Engine...
Caliburn.Micro.Autofac {1.5.0} Integration of Caliburn.Micro with Autofac. Source code with sample projects available at https://github.com/dbuksbaum/Calibu...
Time Elapsed: 00:00:07.6064034
PM> Find-Package autofac -ExactMatch -AllVersions
Id Versions Description
-- -------- -----------
Autofac {4.9.0, 4.8.1, 4.8.0, 4.7.1...} Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that applications stay easy to...
Time Elapsed: 00:00:06.1354507
Get-Project
M> Get-Project -All
ProjectName Type FullName
Install-Package
PM> Install-Package autofac -ProjectName LISA.CMSWeb -Version 3.5.0
Uninstall-Package
https://docs.microsoft.com/en-us/nuget/tools/ps-ref-uninstall-package
PM> Uninstall-Package Microsoft.IdentityModel.Tokens -ProjectName LISA.CMSWeb
Attempting to gather dependency information for package 'Microsoft.IdentityModel.Tokens.5.2.2' with respect to project 'LISA.CMSWeb', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'Microsoft.IdentityModel.Tokens.5.2.2'
Uninstall-Package : Unable to uninstall 'Microsoft.IdentityModel.Tokens.5.2.2' because 'System.IdentityModel.Tokens.Jwt.5.2.2' depends on it.
At line:1 char:1
+ Uninstall-Package Microsoft.IdentityModel.Tokens -ProjectName LISA.CM ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Uninstall-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UninstallPackageCommandTime Elapsed: 00:00:00.7370564
PM> Uninstall-Package system.IdentityModel.Tokens.Jwt -ProjectName LISA.CMSWeb
Attempting to gather dependency information for package 'System.IdentityModel.Tokens.Jwt.5.2.2' with respect to project 'LISA.CMSWeb', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'System.IdentityModel.Tokens.Jwt.5.2.2'
Uninstall-Package : Unable to uninstall 'System.IdentityModel.Tokens.Jwt.5.2.2' because 'IdentityModel.OIDCRelyingParty.5.1.2' depends on it.
At line:1 char:1
+ Uninstall-Package system.IdentityModel.Tokens.Jwt -ProjectName LISA.C ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Uninstall-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UninstallPackageCommandTime Elapsed: 00:00:00.2100244
PM> Uninstall-Package IdentityModel.OIDCRelyingParty -ProjectName LISA.CMSWeb
Attempting to gather dependency information for package 'IdentityModel.OIDCRelyingParty.5.1.2' with respect to project 'LISA.CMSWeb', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'IdentityModel.OIDCRelyingParty.5.1.2'
Resolved actions to uninstall package 'IdentityModel.OIDCRelyingParty.5.1.2'
Removed package 'IdentityModel.OIDCRelyingParty.5.1.2' from 'packages.config'
Successfully uninstalled 'IdentityModel.OIDCRelyingParty.5.1.2' from LISA.CMSWeb
Removing package 'IdentityModel.OIDCRelyingParty.5.1.2' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Removed package 'IdentityModel.OIDCRelyingParty.5.1.2' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Executing nuget actions took 38.2 sec
Time Elapsed: 00:00:38.3872971PM> Uninstall-Package IdentityModel.OIDCRelyingParty -ProjectName LISA.CMSWeb
Attempting to gather dependency information for package 'System.IdentityModel.Tokens.Jwt.5.2.2' with respect to project 'LISA.CMSWeb', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'System.IdentityModel.Tokens.Jwt.5.2.2'
Resolved actions to uninstall package 'System.IdentityModel.Tokens.Jwt.5.2.2'
Removed package 'System.IdentityModel.Tokens.Jwt.5.2.2' from 'packages.config'
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Successfully uninstalled 'System.IdentityModel.Tokens.Jwt.5.2.2' from LISA.CMSWeb
Removing package 'System.IdentityModel.Tokens.Jwt.5.2.2' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Removed package 'System.IdentityModel.Tokens.Jwt.5.2.2' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Executing nuget actions took 12.33 sec
Time Elapsed: 00:00:12.4535618
PM> Uninstall-Package Microsoft.IdentityModel.Tokens -ProjectName LISA.CMSWebAttempting to gather dependency information for package 'Microsoft.IdentityModel.Tokens.5.2.2' with respect to project 'LISA.CMSWeb', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'Microsoft.IdentityModel.Tokens.5.2.2'
Resolved actions to uninstall package 'Microsoft.IdentityModel.Tokens.5.2.2'
Removed package 'Microsoft.IdentityModel.Tokens.5.2.2' from 'packages.config'
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Successfully uninstalled 'Microsoft.IdentityModel.Tokens.5.2.2' from LISA.CMSWeb
Removing package 'Microsoft.IdentityModel.Tokens.5.2.2' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Removed package 'Microsoft.IdentityModel.Tokens.5.2.2' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Executing nuget actions took 19.47 sec
Time Elapsed: 00:00:19.5635814
PM> Uninstall-Package IdentityModel -ProjectName LISA.CMSWeb
Attempting to gather dependency information for package 'IdentityModel.3.6.1' with respect to project 'LISA.CMSWeb', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'IdentityModel.3.6.1'
Uninstall-Package : Unable to uninstall 'IdentityModel.3.6.1' because 'IdentityModel.OIDCRelyingParty.5.1.2' depends on it.
At line:1 char:1
+ Uninstall-Package IdentityModel -ProjectName LISA.CMSWeb
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Uninstall-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UninstallPackageCommand
Time Elapsed: 00:00:00.2785399
使用Force参数
PM> Uninstall-Package IdentityModel -Force -ProjectName LISA.CMSWeb
Attempting to gather dependency information for package 'IdentityModel.3.6.1' with respect to project 'LISA.CMSWeb', targeting '.NETFramework,Version=v4.6.1'
Resolving actions to uninstall package 'IdentityModel.3.6.1'
Resolved actions to uninstall package 'IdentityModel.3.6.1'
Removed package 'IdentityModel.3.6.1' from 'packages.config'
The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Successfully uninstalled 'IdentityModel.3.6.1' from LISA.CMSWeb
Removing package 'IdentityModel.3.6.1' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Removed package 'IdentityModel.3.6.1' from folder 'C:\Users\clu\source\repos\Edenred\LISA_5.0.0.0\Solution\packages'
Executing nuget actions took 2.51 sec
Time Elapsed: 00:00:02.8075028
RemoveDependencies参数
移除package,同时移除所有的依赖
注意事项
如果是把一个website项目,移动到一个现有的Repository中的话。
需要先清空solution文件同级目录下的packages文件夹。
并且roslyn编译器,需要先uninstall然后再重新install。
Package Manager Console的使用的更多相关文章
- 解决VS2015启动时Package manager console崩溃的问题 - Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope
安装VS2015,启动以后,Package manager console崩溃,错误信息如下: Windows PowerShell updated your execution policy suc ...
- Visual Studio 2015 新建MVC项目 Package Manager Console不能使用 (HRESULT: 0x80131500)
Visual studio 2015 突然新建不了MVC项目,报出错误: HRESULT: 0x80131500 在折腾了很长时间,最后在Github上看到这样一个贴 地址:https://githu ...
- NuGet Install-Package报错解决Package Manager Console error - PowerShell version 2.0 is not supported. Please upgrade PowerShell to 3.0 or greater and restart Visual Studio.
问题: Package Manager Console error - PowerShell version 2.0 is not supported. Please upgrade PowerShe ...
- 你需要知道的包管理器(Package Manager)
最近我花了一点时间关注了在不同系统之中所用到的包管理器(Package Manager) .最开始的时候,我是在使用Linux操作系统时,对这种工具以及它背后的想法深深迷恋住了:这真是自由的软件世界. ...
- Error: Could not access the Package Manager. Is the system running?
最近在搭建cordova,android 开发环境,安装android studio之后创建一个demo之后,运行想看一下效果,在运行过程中创建一个虚拟机(arm)的,等了有1分钟左右,再次运行程序, ...
- Visual Studio 2010 更新NuGet Package Manager出错解决办法
在Visual Studio 2010的扩展管理器中发现NuGet Package Manger有最新版本更新提示,选择更新安装提示以下错误信息: 2013/4/25 1:11:48 - Micros ...
- Getting and installing the PEAR package manager
Windows After you have downloaded and installed PHP, you have to manually execute the batch file loc ...
- RPM是RedHat Package Manager(RedHat软件包管理工具)
RPM是RedHat Package Manager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序” rpm 执行安装包二进制包(Binary)以及源代码包(Source)两种 ...
- installation - How to install Synaptic Package Manager? - Ask Ubuntu
installation - How to install Synaptic Package Manager? - Ask Ubuntu How to install Synaptic Package ...
随机推荐
- 移动端click时间、touch事件、tap事件
一.click 和 tap 比较 两者都会在点击时触发,但是在手机WEB端,click会有 200~300 ms,所以请用tap代替click作为点击事件. singleTap和doubleTap 分 ...
- 解决64位debian下无法安装ia32库的问题
原文地址:http://crunchbang.org/forums/viewtopic.php?pid=277918 因为64位debian源中并没有包括32位的软件包,所提安装ia32会提示依赖无法 ...
- Best Reward---hdu3613(manacher 回文串)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3613 题意就是给你一个串s 然后求把s分成两部分之后的价值总和是多少,分开的串 如果是回文那么价值就是 ...
- Cyclic Nacklace ---hdu3746(循环节,kmp)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3746 给你一个字符串,让你在后面加尽量少的字符,使得这个字符串成为一个重复串. abca---添加bc ...
- rest_framework 之分页器
一 分页器--准备 1.1 基本参数 # 普通分页 from rest_framework.pagination import PageNumberPagination # 偏移分页 from r ...
- HTTP来源地址
HTTP来源地址(referer,或HTTP referer),是HTTP表头的一个字段,用来表示从哪儿链接到目前的网页,采用的格式是URL. 换句话说,借着HTTP来源地址,目前的网页可以检查访客从 ...
- webpack打包页面空白的解决方法
- 0701-spring cloud config-简介、Config Server开发、Config Client开发
一.概述 参看地址: https://cloud.spring.io/spring-cloud-static/Edgware.SR3/single/spring-cloud.html#_spring_ ...
- Visual Studio 起始页面关闭新闻等
[工具]->[选项]->[环境]->[启动] 将“下载内容的时间间隔”一项的勾选去掉,然后确定保存.这样,就大功告成啦
- Linux系统常用命令汇总
命令格式:命令 -选项 参数,例如:ls -la /usr:当有多个选项时,可以写在一起.ifconfig:查看当前机器的IP信息service network restart:重启网络服务servi ...