How to Publish a NuGet Package
How to Publish a NuGet Package
Command line
To push packages to nuget.org you must use nuget.exe v4.1.0 or above, which implements the required NuGet protocols. You also need an API key, which is created on nuget.org.
Create API keys
Sign into your nuget.org account or create an account if you don't have one already.
For more information on creating your account, see Individual accounts.
Select your user name (on the upper right), then select API Keys.
Select Create, provide a name for your key, select Select Scopes > Push. Enter * for Glob pattern, then select Create. (See below for more about scopes.)
Once the key is created, select Copy to retrieve the access key you need in the CLI:
Important: Save your key in a secure location because you cannot copy the key again later on. If you return to the API key page, you need to regenerate the key to copy it. You can also remove the API key if you no longer want to push packages via the CLI.
Scoping allows you to create separate API keys for different purposes. Each key has its expiration timeframe and can be scoped to specific packages (or glob patterns). Each key is also scoped to specific operations: push of new packages and updates, push of updates only, or delisting. Through scoping, you can create API keys for different people who manage packages for your organization such that they have only the permissions they need. For more information, see scoped API keys.
Publish with nuget push
At a command prompt, run the following command, replacing
<your_API_key>
with the key obtained from nuget.org:cli
nuget setApiKey <your_API_key>
This command stores your API key in your NuGet configuration so that you need repeat this step again on the same computer.
Push your package to NuGet Gallery using the following command:
cli
nuget push YourPackage.nupkg -Source https://api.nuget.org/v3/index.json
How to Publish a NuGet Package的更多相关文章
- Creating a NuGet Package in 7 easy steps - Plus using NuGet to integrate ASP.NET MVC 3 into existing Web Forms applications
UPDATE: Check out my follow up post where I remove the need for editing the Global.asax.cs and show ...
- 用 NuGet Package Explorer 管理你的攻城武器
缘由:每次新建一个工程,总是要从自己的“弹药库”或者之前的工程里面手动引用一些类库和脚本插件,难免有些繁琐和遗漏.想起经常用到的NuGet,跑到NuGet主页一看,发现有 NuGet Package ...
- 搭建本地Nuget服务器并使用NuGet Package Explorer工具打包nuget包
1.什么是Nuget: 百度百科描述: Nuget是 ASP .NET Gallery 的一员.NuGet 是免费.开源的包管理开发工具,专注于在 .NET 应用开发过程中,简单地合并第三方的组件库. ...
- Updating and Publishing a NuGet Package - Plus making NuGet packages smarter and avoiding source edits with WebActivator
I wrote a post a few days ago called "Creating a NuGet Package in 7 easy steps - Plus using NuG ...
- 使用 dotnet CLI 来打包和发布 .NET Core nuget package
原文链接:使用 dotnet CLI 来打包和发布 .NET Core nuget package 如何使用 visual studio 2015/2017 打包和发布 Nuget package, ...
- [转]Bootstrap 3.0.0 with ASP.NET Web Forms – Step by Step – Without NuGet Package
本文转自:http://www.mytecbits.com/microsoft/dot-net/bootstrap-3-0-0-with-asp-net-web-forms In my earlier ...
- 使用NuGet Package Project快速制作NuGet包
今天在visual studio gallery发现了一个插件NuGet Package Project,通过它可以在Visual Studio中建立Nuget Package工程,直接生成Nuget ...
- Visual Studio 2010 更新NuGet Package Manager出错解决办法
在Visual Studio 2010的扩展管理器中发现NuGet Package Manger有最新版本更新提示,选择更新安装提示以下错误信息: 2013/4/25 1:11:48 - Micros ...
- Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. T
错误提示: Severity Code Description Project File Line Suppression StateError This project references NuG ...
随机推荐
- JavaScript-- 基础知识面试题
1.JavaScript语言特点 1.弱类型,数据类型由数据的值决定 2.解释性脚本语言--解释器是JS引擎 是浏览器的一部分 3.运行在客户端浏览器上 4.有事件驱动机制(按下鼠标,移动窗口等) 5 ...
- css滑动门技术
滑动门的核心技术: 为了使各种特殊形状的背景能够自适应元素中文本内容的多少,以使自由拉伸滑动 利用css精灵(主要是背景位置)和盒子padding撑开宽度,以便适应不同字数的导航栏 一般经典布局 &l ...
- mysql打印用户权限的小技巧
mysql5.5 5.6 SHOW GRANTS FOR mysql> SELECT DISTINCT CONCAT('SHOW GRANTS FOR ''',user,'''@''',host ...
- Centos超详细安装步骤
Linux中三大主流操作系统 Ubuntu 优点:用户界面友好.工具完善 缺点:vps(虚拟服务器)成本较高.不具备商业化服务器操作系统 Centos--目前常用centos6.x,centos7.x ...
- <转载>c++中new一个二维数组
原文连接 在c++中定义一个二维数组时有多种方式,下面是几种定义方式的说明:其中dataType 表示数据类型,如int byte long... 1.dataType (*num)[n] = n ...
- 2.Vue调试工具vue-devtools的安装步骤和使用
1.安装步骤: 打开谷歌浏览器设置 -->扩展程序 -->勾选开发者模式 --->加载已解压的扩展程序 --->选择“chrome扩展”文件夹即可:
- Linux终端彩色显示输出结果
转义序列符 为了添加个人风格的彩色提示符,我们需要使用转义序列符.一个转义序列符是一个控制命令,它控制Shell执行某个特定的动作.一个转义序列符通常以 ESC开始,在Shell中被记录为" ...
- python:pycharm中使用pandas读取中文路径报错问题的解决方案
假如你的文件路径名是这样的,例如:test.csv 只要它是小文件(大文件采用分块读取,后续会补上文件分块读取的相关博客),你的内存扛得住,那就直接 import pandas as pd test ...
- 2018 CERC 混合博弈
N堆石子 先手最多拿A个 后手最多拿B个 每次都至少要拿一个 谁先取完谁赢 如果A和B相等直接就是一个bash博弈 如果一个石堆的石子数少于min(A,B) 则是个nim游戏 我们先讨论只有N=1且A ...
- Python基础之类
一.摘要 面向对象编程 是最有效的软件编写方法之一.在面向对象编程中,你编写表示现实世界中的事物和情景的类,并基于这些类来创建对象.编写类时,你定义一大类对象都有的通用行为.基于类创建对象 时,每个对 ...