NuGet! Didn’t like the name when I heard for the first time! Anyways, NuGet has taken away the .NET open source PAIN! Consequently, now .NET open source is as easy as “Add Reference”.
You do not need to work hard to refer Classic DAL Helpers by downloading at Codeplex.com. You can now add Classic DAL Helpers directly to your Data Access Layer via Visual Studio 2010.
Library Package Manager
But first, we need to get NuGet Library Package Manager from Visual Studio Gallery.
Visual Studio 2010 > Tools > Library Package Manager > Add Library Package Reference…
Once this is added to Visual Studio, you will get Library Package Manager under Tools menu. Also notice that you will get an additional reference option when you right-click on a project in Solution Explorer.
Add Reference
Right-Click on Reference > Add Library Package Reference…
This prompts the similar Add Reference Dialog that can be used to search NuGet packages online. To add Classic DAL Helpers, just search for “DAL” under “Online” Packages and click “Install” button.
That’s it! You have now added Classic DAL Helpers to your project.
Refer Classic Data Access Layer Helpers to implement data access layers in application architecture for usage on Classic DAL Helpers.
Source code and samples are available at Codeplex.com.
Build & Publish NuGet Packages
Building and hosting our own NuGet packages is quite easy with NuGet Package Explorer, available at Codeplex.com as ClickOnce application.
NuGet Package Explorer > New > Edit > Edit Package Metadata
In order to publish packages at NuGet Gallary, you need to get registered at NuGet.org (no Open Auth yet!). This will give you an Access Key which has to be provided when publishing packages.
Please don’t copy mine!
More references:
NuGet > Videos:
There are few videos available at NuGet Videos. Mix11 NuGet in Depth covers almost everything you need to know about NuGet.
Your Own Feeds:
You can have private/corporate feeds as well. Hosting Your Own NuGet Feeds article covers step-by-step approaches.
Refer Setting up a Local NuGet Gallary post to have your own gallery.
Build Server Option:
Integrating building packages into a Build System is possible. Refer Creating and Publishing a Package using NuGet.exe post.
0 comments:
Post a Comment