For faster navigation, this Iframe is preloading the Wikiwand page for NuGet.

NuGet

NuGet
NuGet project logo
开发者Microsoft, .NET基金会
首次发布2010年10月5日 (2010-10-05)
当前版本
  • 6.10 (2024年5月22日;稳定版本)[1]
  • 6.11.0.71 (2024年5月30日;测试版本)[2]
编辑维基数据链接
源代码库github.com/NuGet/Home
编程语言C#
平台.NET Framework
类型软件包管理系统
许可协议Apache License 2.0
网站www.nuget.org/ 编辑维基数据

NuGet是一个自由开源软件包管理系统。用于Microsoft开发平台。以前称NuPack。[4][5]

2010年首次发布。已经进化为一个庞大的工具与服务生态系统。[6]

概述

[编辑]

NuGet作为Visual Studio扩展,能够简化在Visual Studio项目中添加、更新和删除库(部署为程序包)的操作。NuGet包是打包成单个ZIP 文件,文件扩展名是.nupack.nupkg,使用开放打包约定 (OPC) 格式,包含编译代码 (Dll)、与该代码相关的其他文件以及描述性清单(包含包版本号等信息)。[7] 从Visual Studio 2012开始,缺省预安装了NuGet。NuGet 的客户端, nuget.exe 是一个 自由和开源命令行应用程序,可以创建和使用包。 MSBuild.NET Core SDK (dotnet.exe) 可以在它存在时使用它。[7]NuGet也集成入了SharpDevelop

支持多种语言的软件包:

使用

[编辑]

在Visual Studio中,菜单Tools->NuGet Package Manager->Manage NuGet Packages for Solution,或者在Solution名称位置右键选择Manage NuGet Packages for Solution,就打开NuGet管理器。有三个页面:Installed packages(Recent packages),Online(Browse)、Updates。已安装的包可以uninstall。

NuGet提取程序包的内容放到程序包文件夹中(在必要时创建文件夹)。程序包文件夹在.sln文件的并列位置。如果solution的多个project中安装了同一个程序包,则仅提取该程序包一次并由各project共享。[9]

在project名称位置右键选择Build Dependencies->Build Customizations,使得project引用程序包。于是,就会自动添加include路径、lib路径、添加相应的lib、自适应于x86/x64以及debug/release版本。

参见

[编辑]

参考文献

[编辑]
  1. ^ NuGet 6.10 Release Notes. 2024年5月22日 [2024年5月24日]. 
  2. ^ Release 6.11.0.71. GitHub. 2024年5月30日 [2024年5月30日] (英语). 
  3. ^ NuGet 6.1 Release Notes. nuget.org. [2022-09-07]. (原始内容存档于2022-09-01). 
  4. ^ Haack, Phil. NuGet. [2018-09-27]. (原始内容存档于2018-12-26). 
  5. ^ Haack, Phil. Changing the NuPack Project Name. OuterCurve Foundation. 21 October 2010 [6 November 2010]. (原始内容存档于2010-10-25). 
  6. ^ An Overview of the NuGet Ecosystem页面存档备份,存于互联网档案馆). CodeProject (18 August 2013). Retrieved on 6 February 2015.
  7. ^ 7.0 7.1 karann-msft. What is NuGet and what does it do?. docs.microsoft.com. [2020-11-12]. (原始内容存档于2022-09-01) (美国英语). 
  8. ^ NuGet for C++. 26 April 2013 [29 April 2013]. (原始内容存档于2018-12-26). 
  9. ^ Phil Haack:《NuGet: 使用 NuGet 管理项目库》,MSDN杂志,2011年11月. [2018-09-27]. (原始内容存档于2018-09-27). 

外部链接

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
NuGet
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?