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 ...
随机推荐
- 将两个数组相同index的value合并成一个新的value组成一个新的数组
将两个数组相同index的value合并成一个新的value组成一个新的数组 前提: 这两个数组的长度相同 生成后的新数组长度也相同 返回值都是对象 把rows对象的key和value弄成两个数组, ...
- sudo命令 sudoers文件
超级用户权限 # Host alias specification Host_Alias HA = 192.168.1.1, 192.168.1.2 # User alias specificatio ...
- 【Zookeeper】实现负载均衡原理
一.思路 使用Zookeeper实现负载均衡原理,服务器端将启动的服务注册到,zk注册中心上,采用临时节点.客户端从zk节点上获取最新服务节点信息,本地使用负载均衡算法,随机分配服务器. 服务端启动的 ...
- 十年阿里架构师教你如何一举拿下阿里的Offer,(附面试技巧)
前言: 现在很多人即将毕业或者换工作面临找工作,为了帮助大家,遂写下这篇文章.如果你想进入BAT,抑或拿到高工资,无论你的基础如何,你至少要花三个月时间来准备简历.笔试题.面试题.对于没有项目经验,没 ...
- redis目录
一.redis基础 二.django-redis 三.redis数据操作详解 四.redis持久化
- LVM——基本概念
介绍 LVM(Logical Volume Management)是一种存储设备管理技术,它赋予用户权力,汇集和抽象物理存储设备,从而实现更轻松,更灵活的管理. 利用device mapper这个Li ...
- 标准库类型之map
使用map得包含map类所在的头文件#include <map> 定义一个map对象:map<string, int> mapTest;//用string作为索引,存储int对 ...
- Java&Selenium根据实参启动相应浏览器
Java&Selenium根据实参启动相应浏览器 /** * 定义函数initBrowser * @param browser:字符串参数chrome/ie/xx * @return 并返回驱 ...
- C# 调用 python3
1.C# 调用python 本质上是使用命令行运行python 1.1 C# 使用命令行 program.cs using System; using System.Diagnostics; usin ...
- Checklist的补充规则
常见问题: 1.什么时候该补充Checklist? 2.Checklist应该写哪些用例? 3.自己写的模块是否自己执行? 4.什么时候执行Checklist? 5.执行完Checklist大概需要花 ...