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. HDU2604—Queuing

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2604 题目意思:n个人排队,f表示女,m表示男,包含子串‘fmf’和‘fff’的序列为O队列,否则为E ...

  2. hdu1575 Tr A 矩阵快速幂模板题

    hdu1575   TrA 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1575 都不需要构造矩阵,矩阵是题目给的,直接套模板,把对角线上的数相加就好 ...

  3. User Login Client Identification

    w用HTTP认证首部注册用户名. HTTP The Definitive Guide Rather than passively trying to guess the identity of a u ...

  4. SSH整合中,使用父action重构子类action类.(在父类中获取子类中的泛型对象)

    import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import com.opensymphony.x ...

  5. 剑指Offer——链表中环的入口结点

    题目描述: 一个链表中包含环,请找出该链表的环的入口结点. 分析: 设置两个指针p1,p2, 两个指针都从链表的头部开始走,不过p1每次走一步,p2每次走两步. 直到相遇的时候,p2走的长度是p1的两 ...

  6. 如何在 cmd 中打开设备管理器,如何找到打开其他设备的命令?

    Win + R 组合键后,输入 devmgmt.msc 即可. 任意打开一个软件,然后查看其命令行,找到该程序的实际进程名即可. 注意:需要打开的程序需要放在设置过环境变量的目录,确保执行 cmd 时 ...

  7. POJ1470Closest Common Ancestors 最近公共祖先LCA 的 离线算法 Tarjan

    该算法的详细解释请戳: http://www.cnblogs.com/Findxiaoxun/p/3428516.html #include<cstdio> #include<alg ...

  8. 用Html5制作的一款数学教学程序Function Graphics(绘制函数图的程序)

    最近我不仅对游戏开发感兴趣,还对函数图感兴趣,特此我开发了这个程序.以下是一些介绍和下载演示地址,喜欢的朋友可以看看: 一,产品名片 产品名:Function Graphics 版本: 0.1 开发者 ...

  9. PHPcms v9 get标签sql 语句limit无效问题的解决方法

    get标签非常好用,自定义模型后get几乎变成万能的了.但是PHPCMS升级到V9后,把2008的很多功能都去掉了,比如get标签中,在后面自动添加了一个LIMIT 0,20,这样你即使写了num=' ...

  10. 简明python教程八----输入/输出

    通过创建一个file类的对象来打开一个文件,分别使用file类的read.readline或write方法来读写文件. 最后调用一个close方法来告诉Python我们完成了对文件的使用. poem= ...