小匕首-dotnet cli使用nuget指令
2022-04-15 20:08:15 来源:程序员客栈
点击上方蓝色字体,关注我们
一、指令清单输入指令dotnet nuget -h
>dotnet nuget -hNuGet Command Line 6.0.0.129Usage: dotnet nuget [options] [command]Options: -h|--help Show help information --version Show version informationCommands: add 添加 NuGet 源。 delete 从服务器删除一个包。 disable 禁用 NuGet 源。 enable 启用 NuGet 源。 list 列出配置的 NuGet 源。 locals 清除或列出本地 NuGet 资源,例如 http 请求缓存、包文件夹、插件操作缓存或计算机范围全局包文件夹。 push 将包推送到服务器并发布。 remove 移除 NuGet 源。 sign 使用指定的证书对二、获取配置源处的 NuGet 包进行签名。 trust 管理受信任的签名人。 update 更新 NuGet 源。 verify 验证已签名的 NuGet 包。Use "dotnet nuget [command] --help" for more information about a command.
列出配置的 NuGet源:
>dotnet nuget list -hUsage: dotnet nuget list [options] [command]Options: -h|--help Show help informationCommands: client-cert 列出配置中的所有客户端证书。 source 列出所有配置的 NuGet 源。
查看本地数据源source:
>dotnet nuget list source注册的源: 1. nuget.org [已启用] https://api.nuget.org/v3/index.json 2. Osharp [已禁用] D:\Program Files\Nuget\Osharp\nupkgs 3. Microsoft Visual Studio Offline Packages [已禁用] C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\三、启用/禁用配置源
禁用配置源
>dotnet nuget disable -hUsage: dotnet nuget disable [options] [command]Options: -h|--help Show help informationCommands: source 禁用 NuGet 源。Use "disable [command] --help" for more information about a command.
启用配置源
>dotnet nuget enable -hUsage: dotnet nuget enable [options] [command]Options: -h|--help Show help informationCommands: source 启用 NuGet 源。Use "enable [command] --help" for more information about a command.
启用/停用目标源
>dotnet nuget disable source -hUsage: dotnet nuget disable source [arguments] [options]Arguments: name 源的名称。Options: --configfile NuGet 配置文件。如果指定,将仅使用此文件中的设置。如果未指定,则将使用当前目录中的配置文件的层次结构。有关详细信息,请参阅 https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior。 -h|--help Show help information
>dotnet nuget enable source -hUsage: dotnet nuget enable source [arguments] [options]Arguments: name 源的名称。Options: --configfile NuGet 配置文件。如果指定,将仅使用此文件中的设置。如果未指定,则将使用当前目录中的配置文件的层次结构。有关详细信息,请参阅 https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior。 -h|--help Show help information
操作案例
>dotnet nuget disable source nexus-server已成功禁用名称为 nexus-server 的包源。往期推荐
我为什么离开北京
和12岁小同志搞创客开发:有意思的激光切割技术
Python Qt GUI设计:窗口布局管理方法【强化】(基础篇—6)
点击阅读原文,更精彩~相关阅读
-
世界热推荐:今晚7:00直播丨下一个突破...
今晚19:00,Cocos视频号直播马上点击【预约】啦↓↓↓在运营了三年... -
NFT周刊|Magic Eden宣布支持Polygon网...
Block-986在NFT这样的市场,每周都会有相当多项目起起伏伏。在过去... -
环球今亮点!头条观察 | DeFi的兴衰与...
在比特币得到机构关注之后,许多财务专家预测世界将因为加密货币的... -
重新审视合作,体育Crypto的可靠关系才能双赢
Block-987即使在体育Crypto领域,人们的目光仍然集中在FTX上。随着... -
简讯:前端单元测试,更进一步
前端测试@2022如果从2014年Jest的第一个版本发布开始计算,前端开发... -
焦点热讯:刘强东这波操作秀
近日,刘强东发布京东全员信,信中提到:自2023年1月1日起,逐步为...