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

https://docs.microsoft.com/en-us/powershell/module/packagemanagement/uninstall-package?view=powershell-6

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.UninstallPackageCommand

Time 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.UninstallPackageCommand

Time 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.3872971

PM> 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.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'
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的使用的更多相关文章

  1. 解决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 ...

  2. Visual Studio 2015 新建MVC项目 Package Manager Console不能使用 (HRESULT: 0x80131500)

    Visual studio 2015 突然新建不了MVC项目,报出错误: HRESULT: 0x80131500 在折腾了很长时间,最后在Github上看到这样一个贴 地址:https://githu ...

  3. 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 ...

  4. 你需要知道的包管理器(Package Manager)

    最近我花了一点时间关注了在不同系统之中所用到的包管理器(Package Manager) .最开始的时候,我是在使用Linux操作系统时,对这种工具以及它背后的想法深深迷恋住了:这真是自由的软件世界. ...

  5. Error: Could not access the Package Manager. Is the system running?

    最近在搭建cordova,android 开发环境,安装android studio之后创建一个demo之后,运行想看一下效果,在运行过程中创建一个虚拟机(arm)的,等了有1分钟左右,再次运行程序, ...

  6. Visual Studio 2010 更新NuGet Package Manager出错解决办法

    在Visual Studio 2010的扩展管理器中发现NuGet Package Manger有最新版本更新提示,选择更新安装提示以下错误信息: 2013/4/25 1:11:48 - Micros ...

  7. Getting and installing the PEAR package manager

    Windows After you have downloaded and installed PHP, you have to manually execute the batch file loc ...

  8. RPM是RedHat Package Manager(RedHat软件包管理工具)

    RPM是RedHat Package Manager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序” rpm 执行安装包二进制包(Binary)以及源代码包(Source)两种 ...

  9. installation - How to install Synaptic Package Manager? - Ask Ubuntu

    installation - How to install Synaptic Package Manager? - Ask Ubuntu How to install Synaptic Package ...

随机推荐

  1. pymsql与ORM--python操作MySQL之利器

    pymsql 原生模块 pymsql是python中操作MySQL的模块,其使用方法和MySQLdb几乎相同. 下载安装 pip3 install pymysql 使用操作 1.执行SQL impor ...

  2. 剑指Offer——把数组排成最小的数

    题目描述: 输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个.例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323. 分析: 排 ...

  3. Spark Standalone Mode 多机启动 -- 分布式计算系统spark学习(二)(更新一键启动slavers)

    捣鼓了一下,先来个手动挡吧.自动挡要设置ssh无密码登陆啥的,后面开搞. 一.手动多台机链接master 手动链接master其实上篇已经用过. 这里有两台机器: 10.60.215.41 启动mas ...

  4. int文档

    文档 class int(object): """ int(x=0) -> integer int(x, base=10) -> integer ------ ...

  5. Mysql索引长度和区分度

    首先  索引长度和区分度是相互矛盾的, 索引长度太短,那么区分度就很低,吧索引长度加长,区分度就高,但是索引也是要占内存的,所以我们需要找到一个平衡点: 那么这个平衡点怎么来定? 比如用户表有个字段 ...

  6. HBase存储架构

    以下的介绍是基于Apache Hbase 0.94版本: 从HBase的架构图上可以看出,HBase中的存储包括HMaster.HRegionServer.HRegion.Store.MemStore ...

  7. php实现异步的程序调用

    浏览器和服务器之间的通信是基于HTTP协议进行链接通讯的,它是一种请求和相应的协议.浏览器通过URL向服务器发送请求,服务器接收到请求并执行请求,然后服务器将执行完成的数据返回到客户端. 这就存在一个 ...

  8. django 增加验证邮箱功能

    在user文件夹下新建python包,utils 在包内新建文件email_send.py,其中包括验证字符串随机码的产生,数据库的存储和email的发送 # -*- coding: utf-8 -* ...

  9. index full scan和index fast full scan区别

    触发条件:只需要从索引中就可以取出所需要的结果集,此时就会走索引全扫描 Full Index Scan    按照数据的逻辑顺序读取数据块,会发生单块读事件, Fast Full Index Scan ...

  10. vim文本编辑操作

    文本选择操作        为了方便地选取文本块,Vim编辑器引入了可视模式(Visual Mode).要选取一段文本块,操作步骤如下:        ▶ 将光标移动到要复制文本块的开始处.要注意的是 ...