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

  1. 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.

  2. Select your user name (on the upper right), then select API Keys.

  3. 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.)

  4. Once the key is created, select Copy to retrieve the access key you need in the CLI:

  5. 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

  1. 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的更多相关文章

  1. 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 ...

  2. 用 NuGet Package Explorer 管理你的攻城武器

    缘由:每次新建一个工程,总是要从自己的“弹药库”或者之前的工程里面手动引用一些类库和脚本插件,难免有些繁琐和遗漏.想起经常用到的NuGet,跑到NuGet主页一看,发现有 NuGet Package ...

  3. 搭建本地Nuget服务器并使用NuGet Package Explorer工具打包nuget包

    1.什么是Nuget: 百度百科描述: Nuget是 ASP .NET Gallery 的一员.NuGet 是免费.开源的包管理开发工具,专注于在 .NET 应用开发过程中,简单地合并第三方的组件库. ...

  4. 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 ...

  5. 使用 dotnet CLI 来打包和发布 .NET Core nuget package

    原文链接:使用 dotnet CLI 来打包和发布 .NET Core nuget package 如何使用 visual studio 2015/2017 打包和发布 Nuget package, ...

  6. [转]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 ...

  7. 使用NuGet Package Project快速制作NuGet包

    今天在visual studio gallery发现了一个插件NuGet Package Project,通过它可以在Visual Studio中建立Nuget Package工程,直接生成Nuget ...

  8. Visual Studio 2010 更新NuGet Package Manager出错解决办法

    在Visual Studio 2010的扩展管理器中发现NuGet Package Manger有最新版本更新提示,选择更新安装提示以下错误信息: 2013/4/25 1:11:48 - Micros ...

  9. 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 ...

随机推荐

  1. php获取客户机mac地址

    @exec("arp -a",$array); //执行arp -a命令,结果放到数组$array中 foreach($array as $value){ //匹配结果放到数组$m ...

  2. bootstrap 模态框在iphone微信内点击无效

    <a  data-toggle="modal" data-target="#wwww" href=""  οnclick=" ...

  3. <s:bean>标签的使用

    今天在使用<s:bean>时出了一个问题,感觉有意思的就记录下来吧,以备学习 在使用这个标签的时候需要注意两个事项: 1.<s:bean>的三个属性 id,name,var,在 ...

  4. MyBatis工厂工具类 MyBatisUtils

    import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apach ...

  5. 剑指Offer编程题(python)——二叉树

    1.重建二叉树 """ 输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树.假设输入的前序遍历和中序遍历的结果中都不含重复的数字. 例如输入前序遍历序列{1,2,4 ...

  6. 用Python做一个飞机大战游戏

    基于pygame的一款小游戏 这是我上半年做的一款小游戏,但是一直忘记了,现在才上传代码. github项目地址:StarMan 代码基于pygame,Python版本3.5.2运行正常. 游戏很简单 ...

  7. YOLO---YOLOv3 with OpenCV 再使用

    YOLO---YOLOv3 with OpenCV 再使用YOLOv3 with OpenCV官网 @ https://github.com/JackKoLing/opencv_deeplearnin ...

  8. Python计算AUC

    AUC(Area under curve)是机器学习常用的二分类评测手段,直接含义是ROC曲线下的面积.另一种解释是:随机抽出一对样本(一个正样本,一个负样本),然后用训练得到的分类器来对这两个样本进 ...

  9. 通过字节码分析this关键字以及异常表的重要作用

    在之前的字节码分析中缺少对异常的介绍,这次主要来对字节码异常表相关的东东进行一个学习,下面先来编写一个相关异常的小程序: 接着编译来看用javap -verbose来查看一下它的字节码信息: xion ...

  10. Hadoop动态增加节点与删除节点

    Hadoop的全分布式安装网上也很多教程,踩过很多坑,整理不出来了……赶紧把增加删除节点留住. 均衡数据 (1)设置数据传输带宽为64M(默认值比较低) hdfs dfsadmin -setBalan ...