VS中程序包管理器控制台的使用

统信UOS丨开机无法进入系统 无法打开控制台访问权限,root账号被锁定(cannot open access to console, the root account is locked) 步骤四:分别打开文件发现Roota下的fstab就是我们要找的文件,打开查看Roota的属性发现其为挂载的磁盘nvme0n1p3。步骤三:按Win+E打开文件管理器在分区中查找/etc/fstab文件,发现Roota和Rootb下都有该文件。步骤二:按键盘Ctrl+Alt+F4,进入终端控制台,如下图所示输入startx回车,进入桌面。步骤一:找到UOS系统安装的U盘,选择U盘启动进入安装界面,如下图所示。步骤七:关机,拔出U盘,启动电脑,OK,问题解决。 阅读详情

Managing Packages Using the Package Manager Console

This topic describes how to find, install, remove, and update NuGet packages using PowerShell commands. You can also work with packages using the Manage NuGet Packages dialog box. For more information, see Manage NuGet Packages Using the Package Manager dialog.

Using PowerShell commands is required if you want to install a package without having a solution open. It's also required in some cases for packages that create commands that you can access only by using PowerShell.

Finding a Package

From the Tools menu, select Library Package Manager and then click Package Manager Console.

Package Manager Console in menu

The Package Manager Console window is displayed.

Package Manager Console

The two drop-down lists set default values that let you omit parameters from the commands you enter in the window:

  • In the Package source list, select the default source (NuGet package feed) that you want your commands to use. Typically you will leave this as its default value of NuGet official package source. For more information about alternative feeds, see Hosting Your Own NuGet Feeds.
  • In the Default project list, select the default project that you want your commands to work with. (The default value will be the first project in the solution, not necessarily the one you have selected in Solution Explorer when you open the window.)

When you enter commands, you can override these defaults. In the Package Manager Console window, enter Get-Package -ListAvailable at the prompt to see a list of all packages that are available in the selected package source. Starting NuGet 3.0 Beta or higher, Get-Package also takes a -PageSize switch, which enables paging support for listing available packages from a package source.

Get-Package -ListAvailable command

For the default package source, that command is going to list thousands of packages. It makes better sense to specify a filter.

For example, to find the logging package ELMAH, enter Get-Package -ListAvailable -Filter elmah (the name of the package) or Get-Package -Filter Logging -ListAvailable (a keyword in the package description). Starting NuGet client 3.0 Beta or higher, these Get-Package commands can be replaced by Find-Package elmah orFind-Package Logging.

Get-Package command with filter

For more options that you can specify with the Get-Package and Find-Packagecommand, enter Get-Help Get-Package and Get-Help Find-Package, or seePackage Manager Console Powershell Reference.

Installing a Package

After you have found a package that you want to install, use the Install-Packagecommand with the name of the package. For example, enter the command Install-Package elmah as shown in the following example:

Install-Package command

Refer here for a complete list of PowerShell Reference on Install

NuGet retrieves the package from the specified package source and installs it in the project that is selected in the Default project drop-down list (unless you specify a different project in the command). Files are copied to the solution, references might be added to the project, the project app.config or web.config file might be updated, etc.

If the package you are installing is dependent on other packages, NuGet installs them also if they are not already installed.

If the package requires license acceptance, you will not be prompted in a dialog box. Instead, a message states that your use of the library constitutes license acceptance.

License acceptance text in Package Manager Console

In Solution Explorer, you can see references that Visual Studio has added for the installed library or libraries.

Elmah reference in Solution Explorer

If your app.config or web.config file required changes, those have been applied. The following example shows some of the changes for ELMAH.

Web.config changes for elmah

A new folder named packages is created in your solution folder. (If your project does not have a solution folder, the packages folder is created in the project folder.)

packages folder

The packages folder contains a subfolder for each installed package. This subfolder contains the files installed by the package. It also contains the package file itself (the .nupkg file, which is a .zip file that contains all of the files included in the package).

elmah folder in packages folder

You can now use the library in your project. IntelliSense works when you enter code, and library features such as the ELMAH logging information page work when you run the project.

elmah IntelliSense

elmah Error Log page

Extending The Package Manager Console With Packages

Some packages install new commands that you can use in the Package Manager Consolewindow. One example of such a package is MvcScaffolding, which creates commands you can use to generate ASP.NET MVC controllers and views. The following illustration shows that installing MvcScaffolding creates a new command Scaffold, complete with tab expansion.

Installing and using MvcScaffold

Removing a Package

From the Tools menu, select Library Package Manager and then click Package Manager Console. If you do not already know the name of the package you want to remove, enterGet-Package at the prompt without any flags to see a list of all of the packages that are currently installed.

Package Manager Console showing installed packages

To remove a package, use the Uninstall-Package command with the name of the package. For example, use the Uninstall-Package elmah command as shown in the following example:

uninstall package command

For more options that you can specify with the uninstall-package command, enterget-help uninstall-package or see Package Manager Console Powershell Reference.

The following package elements are removed:

  • References in the project. In Solution Explorer, you no longer see the library in theReferences folder or the bin folder. (You might have to build the project to see it removed from the bin folder.)
  • Files in the solution folder. The folder for the package you removed is deleted from the packages folder. If it is the only package you had installed, the packages folder is also deleted.)
  • Any changes that were made to your app.config or web.config file are undone.

If other packages were installed because they were dependencies of the package that you removed, and if no other packages remain that are dependent on the dependency packages, the dependency packages are also removed.

Refer here for a complete list of PowerShell Reference on Uninstall

Updating a Package

From the Tools menu, select Library Package Manager and then click Package Manager Console. To check if there are newer versions available for any installed packages, enterGet-Package -updates at the prompt.

Get-Package command

To update a package, enter Update-Package with the package ID. For example, enter the command Update-Package jQuery. For more options that you can use with theUpdate-Package command, enter get-help Update-Package or see here.

update-package command

Refer here for a complete list of PowerShell Reference on Update

Setting up a NuGet Powershell Profile

For customizing your PowerShell console, click here



转载自:https://docs.nuget.org/consume/Package-Manager-Console

基于深度学习的心律失常的自动分类 基于深度学习的心律失常的自动分类 作者:禅与计算机程序设计艺术 1. 背景介绍 1.1 心律失常的危害与检测的重要性 心律失常是一种常见的心血管疾病,严重威胁着人们的健康和生命。据统计,全球每年有数百万人因心律失 阅读详情

相关推荐

群晖存储空间损毁不等于硬盘损坏:排查与修复实战

NAS存储系统中,物理硬盘、存储池与文件系统空间构成层级结构,任何一层出现异常都可能在管理界面汇总为“存储空间损毁”。事实上,异常断电、卷未正常挂载等软性问题也会触发这一红色告警,而存储池和硬盘SMART状态往往完全正常。理解这一机制后,用户无需急于格式化重建,通过事件日志审查、SSH确认挂载状态,再借助btrfs scrub等文件系统自愈工具,即可在数据不丢失的前提下恢复存储空间正常。该方案对家庭及小型办公环境中的群晖NAS尤其适用,特别是在供电不稳或硬盘休眠频繁的场景下,能有效规避误判风险。本文完整记录

weixin_30843121的博客 262

vs2022 程序包管理器控制台中文乱码

解决程序包管理器控制台中文乱码,数据库迁移命令

qq_22325259的博客 1873

基于 openEuler 24.03 LTS 源码编译安装 Zabbix 7.4

Zabbix是一款开源的企业级分布式监控系统,支持网络、服务器、应用等多种IT资源的监控。核心功能包括数据采集、告警通知、可视化展示等,采用Server/Agent架构,支持多种操作系统。本文详细介绍了在openEuler 24.03系统上部署Zabbix 7.4.2的完整流程,包括环境准备、MySQL配置、PHP/Apache安装、Zabbix编译安装等步骤,为构建企业级监控系统提供了实践指导。

广然笔记 1191

VS2013中Nuget程序包管理器控制台使用入门(一)-准备环境(原创)

准备环境: 1.打开VS2013IDE集成开发环境。 2.新建一个Asp.net Mvc的项目,比如命名为:MvcApplication1 3.打开 菜单"工具"->"库程序包管理器"->"程序包管理器控制台",然后在VS工作区域的右下方会出现一个”程序包管理器控制台“命令操作台。 4.在命令行状态下,出现命令提示符:PM>,在这里,你就可以输入Cml...

weixin_30455067的博客 594

软件工程:数据字典

数据字典

永远怀着至诚之心拥抱世界 4275

避坑指南:QT Creator报Unknown module(s) in QT: serialport的5种解决方法

本文详细解析了Qt Creator报'Unknown module(s) in QT: serialport'错误的5种解决方法,包括检查Qt版本兼容性、安装缺失组件、配置Kit环境等。针对Windows和Linux平台提供具体操作步骤,帮助开发者快速解决串口通信模块问题,提升开发效率。

weixin_29197051的博客 157

VS程序包管理器控制台指令

PM> Update-Package  -ProjectName 'CMS.Update(这里是项目名)'   -Reinstall Newtonsoft.Json(这里包名)

我是孤单的飞鸟 4134

R语言分段回归

1.利用虚拟变量进行线性回归 (MEdata.csv的数据来源:https://github.com/ChenQihome9/优快云-Data-Library/blob/master/MEdata.csv) 问题13:针对TAX~GDP,使用分段回归方法,找到其回归方程。编程,并根据程序结果叙述如下几方面问题:(1)分几段最佳?(不超过5段内)(2)分段位置定在哪儿最佳?(3)写出最佳方...

ChenQihome9的博客 1万+

Package Manager Console的使用

Find-Package PM> Find-Package autofac https://docs.microsoft.com/en-us/nuget/tools/ps-ref-find-package Id Versions Description -- -------- ...

weixin_30375247的博客 1608

深度学习基于Resnet18的图像多分类--训练自己的数据集(超详细 含源码)

深度学习基于Resnet18的图像多分类--训练自己的数据集(超详细 含源码)

她是不会无条件的!! 2万+

手把手教你学simulink(90.1)--直流电动机实例:基于Simulink的基本模型的直流电动机(DC Motor)建模

直流电动机(DC Motor)因其结构简单、控制方便和良好的调速性能,广泛应用于各种工业自动化、机器人技术、家用电器以及航空航天等领域。为了更好地理解和应用直流电动机的工作原理及其控制系统,本项目旨在通过Simulink对直流电动机进行基本模型的建模与仿真。

MHD0815的博客 439

C# NuGet包管理命令

NuGet Package Manager Console 内置于 Visual Studio 在 Windows 2012 和更高版本。(不包含在 Visual Studio 用于 Mac 或 Visual Studio Code。) 控制台,你可以使用NuGet PowerShell 命令若要查找,安装、 卸载和更新 NuGet 程序包。使用控制台是在包管理器 UI 不提...

weixin_30730053的博客 1411

38.XDMA寄存器详解2-H2C、C2H通道寄存器组剖析

目录 1.上节回顾 2. H2C寄存器剖析 2.1 H2C通道标识寄存器(0x00) 2.2 H2C通道控制寄存器(0x04) 2.3 H2C通道状态寄存器(0x40) 2.4 H2C通道完成描述符数量寄存器(0x48) 2.5 H2C通道对齐寄存器(0x4C) 2.6 H2C通道查询模式回写地址寄存器(0x88、0x8C) 2.7 H2C通道中断掩码寄存器(0x90)​ 2.8 H2C通道性能监视控制寄存器(0xC0) 2.9 H2C通道周期计数性能寄存器(0xC4、0xC8) 2

一个早起的程序员 5206

VS2013中Nuget程序包管理器控制台使用入门(一)-准备环境

准备环境: 1.打开VS2013IDE集成开发环境。 2.新建一个Asp.net Mvc的项目,比如命名为:MvcApplication1 3.打开 菜单"工具"->"库程序包管理器"->"程序包管理器控制台",然后在VS工作区域的右下方会出现一个”程序包管理器控制台“命令操作台。   4.在命令行状态下,出现命令提示符:PM>,在这里,你就可以输入Cmlle

imxiangzi的专栏 4930

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

vs2017 打开包管理器 (程序包管理控制台)

工具=》NuGet 包管理器=》程序包管理器控制台 转载于:https://www.cnblogs.com/xuhongcai/p/6884947.html

diaopu0702的博客 2707

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

vs2017中 如何使用npm命令

如图,工具-nugut包管理器-程序包管理器控制台,就是了

weixin_42524279的博客 6697

VS2013中Nuget程序包管理器控制台使用入门(三)-项目实战(原创)

VS2013中Nuget程序包管理器控制台使用入门(三)-项目实战 1.给指定项目安装Newtonsoft.Json ,Version 4.5.11 PM> Install-Package Newtonsoft.Json -Version 4.5.11 -Project mvcapplication1 2.卸载Newtonsoft.Json PM> Insta...

weixin_30340775的博客 422

VS2013中Nuget程序包管理器控制台使用入门(二)-如何使用Nuget提供的帮助(原创)...

如何使用Nuget提供的帮助? 1.从get-help Nuget开始,键入“get-help NuGet”以查看所有可用的 NuGet 命令。 用法: PM> get-help Nuget 主题 about_NuGet简短说明 提供有关 NuGet 程序包管理器命令的信息。 详细说明 本主题介绍 NuGet 程序包管理器命令。NuGe...

weixin_30243533的博客 487

VS2012使用程序包管理器控制台主机安装依赖时出错解决方法

Install-Package : 元素 命名空间“http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd”中的“metadata”。的子元素 命名空间“http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd”中的“frameworkAssemblies”。应为可能元素的列表: 命名空间“http://打开扩展和更新,先卸载现有的NuGet,然后重新下载一个最新版本。

qq_68768688的博客 277

VS2022包显示黄色感叹号

vs->工具->NuGet包管理器->程序包管理控制台。

啸啸说的博客 450

NPOI安装

方法1. 用nuget命令安装npoi引用 步骤:工具-NuGet包管理器- 程序包管理器控制台 命令:install- package npoi -version 2.4.0 方法2:直接引入程序包 步骤:对着解决方案右键,选择“管理NuGet程序包”,点击“浏览”,搜索“npoi”,点击安装 额外补充:还原NuGet程序包 从NuGet中引入的程序包存放在项目解决方案目录下...

无心的爱的专栏 4924

asp.net MVC Code First模式在 vs 程序包管理器控制台执行的数据迁移更新语句

//更新本地数据库  update-database -Force -ConnectionString "Data Source=localhost;Initial Catalog= 数据库名 ;Integrated Security=True;Max Pool Size=512;Min Pool Size=5;Connection Lifetime=15;connect timeout = 1

sxf359的博客 1986

init.ps1 cannot be loaded because running scripts is disabled on this system问题的解决

vs2017 程序包管理器控制台出现红色错误提示: File F:\web code\CustomerManagementSystem\packages\EntityFramework.6.1.3\tools\init.ps1 cannot be loaded because running scripts is disabled on this system. File F:\web c

sxf359的博客 7323

VS2022添加.Net 4.5支持

VS2022升级后不再支持.Net 4.0/4.5项目框架,一共找到两张解决办法: 1:下载VS2019安装程序,单独安装.Net 4.5组件 2:视图>其他窗口>程序包管理器控制台 .Net 4.0:Install-Package Microsoft.NETFramework.ReferenceAssemblies.net40 -Version 1.0.2 .Net 4.5:Install-Package Microsoft.NETFramework.ReferenceAsse

cai58201827的专栏 2471

VS2022安装.NET Framework4.5

Visual Studio 2022 安装.NET Framework4.5及以下目标包_netframework45怎么安装csdn-优快云博客VS2022默认不提供低版本的.NET Framework4.5,因此在创建.NET Framework项目时,找不到.NET Framework4.5或其他低版本框架的选项。

wsxhfa的专栏 3880

最近在用VS2013去生成独立EXE文件的时候报错:"Fody is only supported on MSBuild 16 and above. Current version: 15."

最近在用VS2013去生成独立EXE文件的时候报错:"Fody is only supported on MSBuild 16 and above. Current version: 15." 报错原因:因为VS2013版本过旧,现在Fody到5.0+,Costura.Fody到4.0+,不支持低版本VS。据说是有意为之,希望大家都使用最新的VS。 解决方法:卸载掉项目中的Fody和Costu...

秋天的晴 4461

vs2012找不到system web optimization命名空间

今天新装了vs2012,安装完成后,创建了一个mvc4应用程序,创建生成出现了几个错误。通过错误我们的解决方案就是去找引用不到的路径,如何在vs2012中实现呢? 在工具栏中找工具--库程序包管理器---程序包管理器控制台 完成后下方会出现一个控制台框。在控制台中输入Install-Package Microsoft.AspNet.Web.Optimization 回车,即可将未引用的程...

weixin_30556161的博客 134
上一篇: Android : adb 使用
下一篇: VS中程序包管理器的使用
doris_d
博客等级 码龄12年 79粉丝 126原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值