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. 巨蟒python全栈开发flask11项目开始3

    1.多玩具遥控&&websocket回锅 2.绑定玩具时添加好友的最终逻辑 3.消息&&好友列表 4.chat聊天&&对话窗口 1.多玩具遥控& ...

  2. 20165330 预备作业3 Linux安装及学习

    虚拟机安装 在安装VirtualBox时我的电脑一直打不开官网的下载地址,还好后面有可以打开了,于是我顺利的下载好了VirtualBox.而在运行出现了以下错误: 错误1:点击创建虚拟机时出现了以下提 ...

  3. Webpack4.x 入门

    概览 新建项目 npm init -y 安装webpack & webpack-cli (c)npm install -D webpack (c)npm install -D webpack- ...

  4. d3.js 之关联数据:data操作符

    数据可视化 在可视化工作中,一个基本出发点是将不同的数值映射到不同的可视化 元素的属性上,使其表现出各自不同的视觉特征. 比如:以数组中的每一个值为直径分别创建一个圆,我们得到三个圆: 在d3中,可视 ...

  5. python类可以任意添加属性

    python类可以任意添加属性 class A(object): def __init__(self): self.name = "zhangsan" self.age = 18 ...

  6. 如何查看windows某个目录下所有文件/文件夹的大小?

    如何查看windows某个目录下所有文件/文件夹的大小? TreeSize Free绿色汉化版是一款硬盘空间管理工具,用树形描述出来,能够显示文件大小和实际占用空间数及浪费的空间等信息,让你做出相应的 ...

  7. DotNet Core全新认识

    一.概述      .NET 经历14年,在Windows平台上的表现已经相当优秀,但是“跨平台.开源”却是其痛点,从16年开始.NET Core的出现将迎来.NET的真正意义上的跨平台和开源序幕. ...

  8. 22.解决 eclipse 与 AS 共用 SDK 导致 eclipse ADT 无法使用的问题

    相信很多同学在从eclipse 转 AS 都会遇到这个问题,因为方便所以共用了一个sdk 目录,但是AS 会主动更新sdk,然而手贱的跟新了一夜,再打开eclipse的时候瞬间呆滞了,这一夜发生什么了 ...

  9. html5游戏开发--"动静"结合(二)-用地图块拼成大地图 & 初探lufylegend

    一.前言 本次教程将向大家讲解如何用HTML5将小地图块拼成大地图,以及如何用现有的高级html5游戏开发库件lufylegend.js开发游戏. 首先让我们来了解了解如何用html5实现动画,毕竟“ ...

  10. 使用JS实现页面倒数计数

    <script type="text/javascript"> var number = 5; function showNum(){ if(number==1){ w ...