BANGALORE, INDIA: Developing in .NET has always been an easy and productive way of creating applications - unless trying to use or contribute to open source. Using an open source .NET package has usually meant getting the project, compiling it, making the right references in the .config files and then hoping that the rest of your apps run with it.
Contributing to .NET open source required you to put it up on CodePlex and give instructions on how to use it in different types of .NET projects. In both cases, open source projects are more developer-unfriendly than friendly.
This is where a new tool called NuGet comes in. Developed by Microsoft for Visual Studio 2010 (including the free Express editions), it allows developers to not only easily find and use open source libraries within their own projects, but also allows them to contribute their code for others to use within their projects.
NuGet itself is free and open source as well.
Adding OSS libraries
There are many ways that you can install NuGet for VS2010. If you download the latest ASP.NET MVC3 stack from www.asp.net, NuGet 1.0 is bundled within. If you want to get it directly, head over to www.nuget.org and download and install it. Or open up Visual Studio 2010's Extensions Manager (inside the Tools menu) and look for NuGet within it. Once NuGet is installed, VS2010 will also automatically look for updates if available. NuGet is currently available as version 1.1 as of this writing.
Once NuGet is installed, there are many different ways you can add open source libraries to your current project. The first is through the References section of your project. Simply right-click the References folder and choose the new Add Library Package Reference....
This brings up a dialog box that downloads a "package list" from the NuGet repository. There is a default 'official' NuGet repository - but you can add your own ones if you want as well. You can also search for any package within the repository using the name or any keyword.
For instance, if you want to add PDF creation or Twitter features in your .NET project, simply enter 'PDF' or 'Twitter' in the search box and you will be presented with open source libraries for .NET that enable such development. Click the Install button to download and install the package.
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.