1.Introduction
NuGet is a Visual Studio 2010 extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework. This topic lists documentation that will help you use NuGet packages and create your own.
NuGet是一個開源的項目,項目的發起人是微軟的幾個人員。如果你關注NuGet建議關注這兩個人:
a.David Ebbo http://blog.davidebbo.com/ Twitter: @davidebbo
b. Phil Haack http://haacked.com/
2.Why NuGet
NuGet的使用可以縮短我們下載和添加dll的時間。不適用nuget的時候,我們添加一個dll需要先下載,解壓,添加引用等等。而使用nuGet只需要一步操作。
可以看出來,使用NuGet後,dll的配置可以自動添加,而且當有新的版本出現時可以自動更新dll。
使用NuGet另外一個優點是,你添加一個dll後,它會自動把相關聯的dll給添加到引用中來。
3.安裝NuGet
你可以去codeplex上下載NuGet,或者使用VS2010的Extension Manager來安裝NuGet:
關於NuGet的使用,我這裡就給大家說明下如何使用協助命令:
4.NuGet的打包和Feed:
1. 如何打包一個NuGet包: http://nuget.codeplex.com/wikipage?title=Creating%20a%20Package
2.Hosting Your Own Local and Remote NuGet Feeds
http://haacked.com/archive/2010/10/21/hosting-your-own-local-and-remote-nupack-feeds.aspx
5.NuGet.org
只需要註冊一個帳號就可以上傳Package了。 如果你需要和別人分享一個模組或者項目,可以試試使用nuget來分享。